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