JSONL / NDJSON Converter
Convert a JSON array to newline delimited JSON and back. Validates every line, reports the exact line number of a bad record, and keeps large exports out of any server.
Last reviewed by the Radiatus Cloud team
Need this built for your product?
We design, build & host secure software & APIs.
Why line delimited JSON exists
A large JSON array has one structural flaw: it cannot be read until the closing bracket arrives. A consumer must hold the entire document in memory before the parser can hand back a single record. Newline delimited JSON, written NDJSON or JSONL depending on who is asking, solves that by putting one complete JSON value on each line. A reader can then process a hundred gigabyte export a line at a time with constant memory, and a writer can append new records without rewriting the file.
Where the format is used
BigQuery and Snowflake bulk loaders, Elasticsearch bulk indexing, OpenAI and Anthropic fine-tuning datasets, Kubernetes and Docker log drivers, and most streaming HTTP APIs all speak this format. That is why exporting from one tool and importing into another so often means converting between an array and JSONL, usually under time pressure during a migration.
What conversion has to get right
Two rules cause almost every failure. Each line must be a complete, self contained JSON value with no trailing comma, and no line may contain a raw newline inside a string, because the newline is the record separator. This converter enforces both, validates each line independently, and tells you the exact line number and parser message when one fails rather than rejecting the whole file with a single unhelpful error.
Related tools
- JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
- JSON Validator — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
- Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
- HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.
Frequently Asked Questions
Is JSONL the same thing as NDJSON?
In practice yes. NDJSON is a small published specification, JSONL is the informal name, and both mean one JSON value per line separated by a newline. A few tools additionally require the file to end with a trailing newline, which this converter emits.
What happens to nested objects and arrays?
Nothing. Each record is serialised on a single line, so nested structures are preserved exactly; only the whitespace between tokens is removed. Round tripping a document through both directions returns the same data.
Why does my file fail on one line only?
Almost always a truncated record from an interrupted export, or a pretty printed object that spans several lines. The line number in the error points at the first line the parser could not complete.
Can it handle a very large file?
It is limited by browser memory rather than an upload limit, so files in the tens of megabytes are comfortable. Genuinely huge exports are better streamed with jq or a script, since nothing in a browser tab can process them a line at a time.
Does the array direction require the input to be an array?
Yes, for array to JSONL. If you paste a single object it is treated as a one record dataset, which is usually what you want when preparing a test fixture.
Privacy & Security
Everything runs in your browser; nothing is uploaded.
How to Use
Paste a JSON array or NDJSON text and pick a direction. Bad lines are reported with their line numbers.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
JSON Formatter
DeveloperFormat and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
JSON Validator
DeveloperValidate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
Regex Tester
DeveloperTest regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.