Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

JSON to JSONL Converter

Paste a JSON array and instantly convert each element to a separate line in NDJSON format

Your files never leave your browser
Input0 chars, 0 lines
Output0 chars, 0 lines
Ready·

Paste a JSON array and get one object per line — or go the other way, from JSONL back to a standard array. Handles nested structures, keeps your data intact, and converts instantly. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste JSON Array
➔
Strip Brackets & Commas
➔
One Object Per Line

The tool parses your JSON array, then writes each element as a single minified line. No pretty-printing — JSONL spec requires each line to be self-contained valid JSON. Nested objects and arrays stay exactly as they are. Going the other direction, it reads each line, parses it individually, and wraps everything back into a standard array.

Examples

User Records for BigQuery Import

You exported user data as a JSON array but BigQuery's bulk loader needs JSONL.

INPUT
[ {"id": 1, "name": "Alice", "role": "admin"}, {"id": 2, "name": "Bob", "role": "editor"}, {"id": 3, "name": "Carol", "role": "viewer"} ]
OUTPUT
{"id":1,"name":"Alice","role":"admin"} {"id":2,"name":"Bob","role":"editor"} {"id":3,"name":"Carol","role":"viewer"}

Nested Product Catalog

E-commerce data with nested tags and pricing tiers — everything stays intact on a single line.

INPUT
[ { "sku": "W-100", "name": "Widget", "prices": [9.99, 8.49], "tags": ["sale", "popular"] } ]
OUTPUT
{"sku":"W-100","name":"Widget","prices":[9.99,8.49],"tags":["sale","popular"]}

JSONL Back to JSON Array

Log entries from Elasticsearch that need to go into a standard JSON file for another team.

INPUT
{"ts":"2024-03-01","level":"error","msg":"timeout"} {"ts":"2024-03-01","level":"warn","msg":"slow query"} {"ts":"2024-03-02","level":"info","msg":"recovered"}
OUTPUT
[ {"ts":"2024-03-01","level":"error","msg":"timeout"}, {"ts":"2024-03-01","level":"warn","msg":"slow query"}, {"ts":"2024-03-02","level":"info","msg":"recovered"} ]

Who Uses This

👨‍💻 Data Engineers

Preparing bulk import files for BigQuery, Snowflake, or Redshift that require JSONL format.

📊 ML Engineers

Converting training datasets to JSONL for fine-tuning OpenAI models or feeding into Hugging Face pipelines.

🛠️ Backend Developers

Formatting API response data into line-delimited logs for Elasticsearch or Splunk ingestion.

📈 Data Analysts

Converting exported JSON arrays into a format that tools like jq can process line by line without extra flags.

Common Mistakes

Pasting a single object instead of an array

If you paste {"name":"Alice"} without brackets, you get a single-line JSONL file — technically correct, but probably not what you wanted. Wrap it in [...] first if you have multiple objects.

Adding trailing newlines in JSONL input

Extra blank lines at the end of your JSONL will cause parse errors in strict parsers. This tool skips blank lines automatically, but other tools might not. Clean your data before using it elsewhere.

Pretty-printing JSONL output

JSONL means one record per line. If you pretty-print an object across multiple lines, you break the format. Each line must be a complete, minified JSON value — no exceptions.

Technical Details

Frequently Asked Questions

What's the difference between JSONL, NDJSON, and JSON Lines?

They're the same thing. JSONL, NDJSON (Newline Delimited JSON), and JSON Lines all refer to a format where each line is a standalone JSON value separated by a newline character. Different tools picked different names, but the spec is identical.

Can I convert a JSON file larger than 100MB?

The tool runs in your browser, so the limit depends on your device's available memory. Files up to around 50MB work fine on most machines. For anything bigger, a command-line tool like jq works better — run jq -c '.[]' input.json > output.jsonl and you're done.

Why do APIs and databases prefer JSONL over regular JSON?

Regular JSON arrays need to be fully loaded into memory before you can process them. JSONL lets you read and write one record at a time, which is way more efficient for large datasets. Services like BigQuery, Elasticsearch, and the OpenAI fine-tuning API all expect JSONL for exactly this reason.

Does converting to JSONL change my data?

No. Your values, keys, nesting — all of it stays the same. The only change is structural: the wrapping array brackets and commas between elements get removed. Each object becomes its own line. Convert back to a JSON array and you get the original data.

Is my data safe when I paste it here?

Yes. Everything runs in JavaScript inside your browser. Nothing gets sent to a server. You can disconnect from the internet and the tool still works — try it. No cookies, no analytics on your actual data, no storage.

Share: