NDJSON Converter
Convert NDJSON or JSONL to a JSON array and back online. Auto-detects direction, reports the line number of bad records — 100% in your browser.
What is the NDJSON Converter?
The ByteTools NDJSON Converter moves data between newline-delimited JSON and a standard JSON array in either direction.
- NDJSON and JSONL to JSON array, and back again
- Auto-detects the direction from your input
- Reports the exact line number of an invalid record
- Optionally skip invalid lines and keep the rest
- Pretty-printed or minified array output
- 100% private — data never leaves your browser
How to use the NDJSON Converter
- 1
Paste your NDJSON lines or a JSON array, or drop a .ndjson, .jsonl or .json file.
- 2
Leave Direction on Auto-detect, or force the conversion you want.
- 3
Choose the indentation used when writing a JSON array.
- 4
Click Convert, then copy the result or download it as .json or .ndjson.
About the NDJSON Converter
The ByteTools NDJSON Converter moves data between newline-delimited JSON and a standard JSON array in either direction. Paste JSONL log lines and get a pretty-printed array; paste an array and get one compact JSON document per line, exactly the format that streaming APIs, BigQuery, Elasticsearch bulk loads and log pipelines expect.
Direction is detected automatically from your input, or you can force it. Blank lines are ignored, and if a line is not valid JSON the tool names the line number instead of failing silently — or you can skip bad records and keep everything that parsed.
The conversion runs 100% locally in your browser with JavaScript. Your data is never uploaded, logged or stored, so it is safe to use with production logs, exports and event streams.
Frequently asked questions
What is the difference between NDJSON, JSONL and a JSON array?
NDJSON and JSONL are the same idea under two names: one complete JSON value per line, with no surrounding brackets or commas. A JSON array wraps everything in [ ] as a single document. Line-delimited formats stream better; arrays are easier to load whole.
How do I convert JSONL to a JSON array?
Paste your JSONL lines and click Convert. Each non-empty line is parsed and collected into one array, which is then pretty-printed at the indentation you chose and ready to copy or download.
How do I convert a JSON array to NDJSON?
Paste an array at the top level and the tool detects the direction automatically, writing each element as one compact line. That is the format bulk-load endpoints and log shippers expect.
What happens if one line is malformed?
The conversion stops and tells you which line number failed so you can fix it. If you would rather salvage the rest, tick 'Skip invalid lines' and the tool counts how many records it left out.
Is my data uploaded anywhere?
No. Parsing and conversion happen entirely in your browser with JavaScript. Nothing is transmitted or stored, so production logs and event exports stay private.
Related tools
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON Validator
Free online JSON validator: validate JSON and find syntax errors with the exact line and column. See root type, key counts and depth — instant and 100% private.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
JSON Flattener
Flatten nested JSON into single-level dot-notation keys online. Choose the separator, bracket or dotted array indexes, and copy or download the result.
JSON Diff
Compare two JSON documents structurally and see added, removed and changed values by path, ignoring key order. Free online JSON diff, 100% in your browser.