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

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 Download 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.

convert JSON Lines to SQL file - task window

then show the wizard.

Select source/target file type.

convert JSON Lines to SQL file - select type

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

convert JSON Lines to SQL file - open saved JSON file

2. Config target SQL file.

convert JSON Lines to SQL file - config SQL file

3. Set rows options.

convert JSON Lines to SQL file - summary

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

convert JSON Lines to SQL file - convert to SQL file

See SQL file

convert JSON Lines to SQL file - view  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:

Set scheduled tasks for converting JSON Lines (JSONL / NDJSON / LDJSON) to SQL

You can schedule and automate this converting task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “JSON Lines to SQL” conversion.
  2. Set scheduled task for “JSON Lines to SQL” conversion.

FAQ

What is Withdata DataFileConverter?
How long does it take to convert JSON Lines to SQL?
Is it safe to convert JSON Lines to SQL using DataFileConverter?
Can I convert JSON Lines to SQL on Linux, Mac OS?
Can I convert JSON Lines to SQL in command line?

More tools for JSONL / NDJSON / LDJSON.

JSON Lines → SQL reference

Type mapping

Value kindin JSON Linesin SQL
Int1234 (number)INT
Bigint9007199254740993BIGINT
Decimal1234.56 (number)DECIMAL(p,s)
Float1.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
Booleantrue / false (boolean)BOOLEAN / SMALLINT
JSONnested object on the same lineJSON / TEXT

Dialect differences

Both JSON Lines and SQL are file formats, so what differs below is how each one chooses to represent a value.

Propertyin JSON Linesin SQL
identifiersDouble quotes; backslash escapes (a newline inside a string...Two competing conventions: single-quoted literals and diale...
datesNo date type: dates arrive as stringsDepends on the dialect: DATE literals, TO_DATE(), or plain ...
binaryNot supported natively - base64 inside a stringDialect-specific: X-quoted literal, 0x hex, or decode()
separatorNewline between recordsStatement terminators (;)
encodingUTF-8 by definitionNo declaration
typingSame as JSON, but records cannot nest across linesTypes belong to the target database, and they differ betwee...
shapeFlat streamStatements; a dump usually means CREATE TABLE plus INSERT rows
ceilingStreams, 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.


Posted

in

by