EEvlarSoft

JSON to NDJSON

Convert JSON to JSONL (newline-delimited JSON) and back on your own PC, from a pasted snippet to a multi-gigabyte export, with numbers left untouched.

Buy for $1.99
One payment. No subscription.
14-day money-back guarantee.
3.0
A JSON array in, one record a line out.
Gigabyte files stream from disk, a piece at a time.
NDJSON back to one JSON array.
A mistake is shown with its line and column.
Click the printer to save the file.
Nested arrays, pretty-printing and line endings, your way.

A JSON array in, one record a line out.

190,000+downloads of EvlarSoft apps
Signed by EvlarSoftVerified US publisher
14-day money-backNo questions asked
Updates includedNo upgrade fees

Convert JSON to JSONL without a script

To convert JSON to JSONL, each element of a top-level array is written as compact JSON on its own line, and the surrounding brackets and commas go away. The result is the same data in the shape that log shippers, bulk-import endpoints, search indexes and machine-learning datasets ask for. NDJSON, JSON Lines and LDJSON are three names for that format.

The usual answer online is a jq one-liner or a short script. Both work until the file is large, because many of them read the whole array into memory first. This converter streams from disk a chunk at a time, so memory use stays level whether the export is a few kilobytes or several gigabytes, and a progress readout shows how far it has got.

It runs the other way too. NDJSON → JSON gathers every line into a single array, skipping blank lines, for tools that only accept one JSON document.

JSONL vs JSON: when you need each

A standard JSON file is one value, usually an array, that has to be parsed as a whole. That suits config files and API responses that a program loads in one go.

JSONL puts one complete value per line. A reader can process a single record, skip a damaged line, or start halfway through without parsing everything before it, and a writer can append records without rewriting the file. That is why logs, streaming APIs and training data favor it. If a tool rejects your file with a message about an unexpected bracket or extra data after the first record, it almost certainly wanted one format and got the other.

How to turn a JSON array into NDJSON

A single object, or several values already sitting one after another, are accepted too and come out one per line.

  • Paste the array into the box, choose Open file (Ctrl+O), or drop a .json file on the window. Conversion starts straight away.
  • Check the direction switch reads JSON → NDJSON. A file ending in .ndjson, .jsonl or .ldjson, or pasted text that already looks line-delimited, flips it to NDJSON → JSON for you.
  • Look at the preview on the right: the first records, numbered, and the total count.
  • Press Save the output on the printer, or Ctrl+S, to write the file under the source name with .ndjson or .json on the end. Copy output puts the result on the clipboard instead.

JSONL to JSON with your choice of layout

Under Going back to JSON, pick Pretty-print, 2 spaces, Pretty-print, 4 spaces, Pretty-print, tabs, or One record a line for a compact array that is still readable in a diff. Line endings default to LF, the NDJSON standard, with CRLF available for Windows tools.

Nested arrays stay one record is on by default, so an array inside the top-level array becomes a single line. Switch it off and each inner array's items become records of their own, which is handy for flattening a batched export.

Exact values and clear errors

Nothing is parsed into floating point and printed back, so a price written 128.40 keeps its trailing zero and a 17-digit ID such as 9007199254740993 is not rounded. String escapes such as \u00e9 stay as they were.

The parser is strict. On bad input it stops at the first problem, marks the line and column in the box, and says what it expected, for example that a comma or a closing bracket should come next. For line-delimited input it names the first line that is not valid JSON. Format indents pasted JSON for reading without altering any value.

Features

  • JSON array to NDJSON / JSON Lines, and NDJSON back to an array
  • Streams large files from disk with a progress readout
  • Direction picked automatically from .ndjson, .jsonl or .ldjson names
  • Preview of the first records and a total count before saving
  • Numbers and escapes copied byte for byte
  • Line and column error marking with a plain-English hint
  • Four output layouts for the JSON direction
  • Option to split nested arrays into separate records
  • LF or CRLF line endings
  • Paste, open, drag and drop, copy and save, with Ctrl+O and Ctrl+S

What's new in 2.0.2

  • New: NDJSON back to JSON, as well as JSON to NDJSON
  • New: big files stream from disk, with progress
  • New: see the first records and the count before you save
  • New: invalid JSON is shown with its line and column
  • New: copy the output, drop a file on the window, light and dark themes
  • New: settings for nested arrays, pretty-printing and line endings
  • Fixed: Convert no longer stays greyed out after typing JSON in

Questions

Anything else? Ask us

Can it convert JSON files that are several gigabytes?

Yes. Files are read from disk a piece at a time, so memory use stays flat however big the file is, and a progress readout shows how far it has got. Files over 4 MB show only their first part in the window. Copying to the clipboard is limited to 64 MB of output, so save larger results as a file.

Does it change numbers, such as rounding long IDs or dropping trailing zeros?

No. Values are copied as written, so 128.40 stays 128.40 and an ID like 9007199254740993 keeps every digit. Text keeps its escapes too, such as \u00e9.

Can it convert NDJSON or JSON Lines back to a JSON array?

Yes. Switch to NDJSON to JSON, or open a .ndjson, .jsonl or .ldjson file and the direction is chosen for you. Blank lines are skipped, and each record can be pretty-printed with 2 spaces, 4 spaces or tabs, or kept to one line.

Does it accept JSON with trailing commas or other mistakes?

No. It reads strict JSON and stops at the first problem, marking the line and column and saying what should come next. For NDJSON input it names the first line that is not valid JSON.

What happens to arrays nested inside the top-level array?

By default each nested array stays one record on one line. Turn off Nested arrays stay one record in Settings and the items of each nested array become records of their own.

Can I choose LF or CRLF line endings, and does it read UTF-16 files?

Yes to line endings: LF is the default and CRLF is available in Settings. UTF-8 files with or without a byte order mark are read, but UTF-16 files are refused with a message to save them as UTF-8 first.

Is NDJSON the same as JSONL?

Yes, in practice. NDJSON (newline-delimited JSON), JSONL (JSON Lines) and LDJSON describe the same thing: one valid JSON value per line, separated by a newline. Files with any of those extensions open in the NDJSON → JSON direction.

What is the file extension for JSON Lines?

.jsonl is the most common, with .ndjson and .ldjson also in use. Saved output takes the name of the file you opened, such as orders.ndjson from orders.json.

Which versions of Windows does it run on?

Windows 10 (version 1809 or later) and Windows 11.

Is it a subscription?

No. JSON to NDJSON is a one-time purchase of $1.99, and updates are included.

How do I get it?

Buy it on this page and your license key arrives by email. If the button says Notify me, JSON to NDJSON is not on sale here yet; leave your email and we will tell you when it is.