Want to convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL file?
Try Withdata Data File Converter, a JSON lines to SQL converter for Windows, Mac, and Linux, Convert JSON Lines 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.
Download Withdata DataFileConverter
JSON Lines text format (JSONL), also called Newline-delimited JSON (NDJSON), or Line-delimited JSON (LDJSON). JSON Lines files may be saved with the file extension .jsonl, *.ndjson, *.ldjson.
Convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL file
Choose JSON Lines (JSONL / NDJSON / LDJSON) file -> Set target SQL file -> Convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL
Click “Start a New Convert” at task dialog.

then show the wizard.
Select source/target file type.

1. Open a JSON Lines (JSONL / NDJSON / LDJSON) file.

2. Config target SQL file.

3. Set rows options.

4. Convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL.

See SQL file

Convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL in command line
Save “JSON Lines (JSONL / NDJSON / LDJSON) to SQL” session, then you can:
- Convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL in Windows command line.
- Convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL in Linux command line.
- Convert JSON Lines (JSONL / NDJSON / LDJSON) to SQL in macOS command line.
Set scheduled tasks for converting JSON Lines (JSONL / NDJSON / LDJSON) to SQL
You can schedule and automate this converting task by:
- Save session and create .bat (Windows) or .sh (Linux/macOS) file for “JSON Lines to SQL” conversion.
- Set scheduled task for “JSON Lines to SQL” conversion.
FAQ
More tools for JSONL / NDJSON / LDJSON.
JSON Lines → SQL reference
Type mapping
| Value kind | in JSON Lines | 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" | 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 on the same line | JSON / TEXT |
Dialect differences
Both JSON Lines and SQL are file formats, so what differs below is how each one chooses to represent a value.
| Property | in JSON Lines | in SQL |
|---|---|---|
| identifiers | Double quotes; backslash escapes (a newline inside a string... | Two competing conventions: single-quoted literals and diale... |
| dates | No date type: dates arrive as strings | 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 | Newline between records | Statement terminators (;) |
| encoding | UTF-8 by definition | No declaration |
| typing | Same as JSON, but records cannot nest across lines | Types belong to the target database, and they differ betwee... |
| shape | Flat stream | Statements; a dump usually means CREATE TABLE plus INSERT rows |
| ceiling | Streams, so it scales past what a single JSON document can ... | 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.
