Want to convert SQL file to JSON file?
If you want to export SQL Server to JSON, see this page: SQL Server to JSON.
If you want to export SQLite to JSON, see this page: SQLite to JSON.
Try Withdata Data File Converter, a desktop SQL to JSON converter for Windows, MacOS, and Linux, Convert SQL to JSON, Easy and Fast.
- Can run in GUI mode, Step by Step, just a few mouse clicks.
- Can run in Command line, for Scheduled Tasks and Streams.
- Convert files locally and privately, avoid uploading large SQL file(s) to online services.
- Support Windows, Linux, and macOS.
Download DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
Convert SQL to JSON
Choose SQL file -> Set JSON file -> Convert SQL to JSON
“Start a New Convert” for “SQL to JSON”.
Select From “File” “SQL” To “File” “JSON”.
1. Open source SQL file.
Support large SQL file ( > 4GB ).
Source SQL file’s content is like this:
2. Config target JSON file.
3. Set rows options.
4. Convert SQL to JSON.
After converting, you can view the output JSON file.
More about SQL to JSON converter
Download Withdata DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
See Video: Convert SQL file to JSON file in a few clicks
See also:
- Merge multiple SQL files into one JSON
- Batch convert SQL files to JSON files
- Convert SQL to JSON Online for Free
SQL → JSON reference
Type mapping
| Value kind | in SQL | in JSON |
|---|---|---|
| Int | INT | 1234 (number) |
| Bigint | BIGINT | 9007199254740993 |
| Decimal | DECIMAL(p,s) | 1234.56 (number) |
| Float | DOUBLE PRECISION | 1.234e10 (number) |
| Text | VARCHAR(n) | "text" (string) |
| Long text | TEXT / CLOB | "multi-line\ntext" (escaped newline inside a string) |
| Date | DATE | "2026-09-18" (string) |
| Datetime | TIMESTAMP | "2026-09-18T14:30:00Z" (string) |
| Binary | BLOB / BYTEA | "base64:..." (string) |
| Boolean | BOOLEAN / SMALLINT | true / false (boolean) |
| JSON | JSON / TEXT | nested object or array, kept as structure |
Dialect differences
Both SQL and JSON are file formats, so what differs below is how each one chooses to represent a value.
| Property | in SQL | in JSON |
|---|---|---|
| identifiers | Two competing conventions: single-quoted literals and diale... | Double quotes; backslash escapes |
| dates | Depends on the dialect: DATE literals, TO_DATE(), or plain ... | No date type: dates arrive as strings and the reader must p... |
| binary | Dialect-specific: X-quoted literal, 0x hex, or decode() | Not supported natively - base64 inside a string |
| separator | Statement terminators (;) | Braces and commas |
| encoding | No declaration | UTF-8 by definition |
| typing | Types belong to the target database, and they differ betwee... | string, number, boolean, null, object, array - no date type |
| shape | Statements; a dump usually means CREATE TABLE plus INSERT rows | Nested objects and arrays |
| ceiling | No formal limit, but a single INSERT statement has to fit i... | Whole document is usually parsed into memory |
Do it online, free
Skip the manual work — convert SQL to JSON online, free (runs in your browser, nothing is uploaded). For large files or batch jobs, use the desktop apps.