Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Data Formats

NDJSON <-> JSON Array

Turn NDJSON / JSON Lines (one JSON value per line) into a single JSON array, or split a JSON array into one compact JSON value per line. Blank lines are ignored; a malformed line is reported by number.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

Two directions behind one switch

In the default direction every non-blank input line is parsed as a JSON value and collected into a single JSON array, with a malformed line reported by its line number. Switch Direction to "JSON array → NDJSON" and a top-level array is emitted as one compact JSON value per line. Either way the stats report how many elements came out.

Where NDJSON turns up

Use it when a log pipeline, a bulk upload endpoint, a warehouse export or a streaming API wants JSON Lines but you hold an array, or when someone hands you NDJSON and you need to read it as one document. It is also the fastest way to pretty-print a file of one-record-per-line data.

The indent switch only works one way

In the NDJSON → array direction, Array output chooses between compact output and two-space pretty printing, which is what you want when reading or diffing the result. The other direction emits one compact value per line by definition, because pretty-printing would break the format, so the option is hidden and ignored there.

What gets rejected

Blank and whitespace-only lines are skipped, but every other line must be a complete JSON value: trailing commas, comments and bare unquoted strings are not JSON and raise an error naming the offending line. Producing NDJSON requires a top-level array, so a single object is refused, and a null element is written as the JSON token null.

Converted inside the tab

All parsing and serialising happens in your browser and the records are never uploaded. You can convert internal exports or customer data freely, with no network connection.

Questions

What counts as a line?

Input is split on newlines. Empty or whitespace-only lines are skipped; every other line must be a complete JSON value.

Does the indent option affect NDJSON output?

No. When producing NDJSON each line is always a single compact JSON value. The indent option only pretty-prints the array in the other direction.

What about a byte-order mark or trailing whitespace?

A blank or whitespace-only line is skipped, and trailing spaces on a line are harmless because JSON.parse ignores surrounding whitespace. A byte-order mark at the very start is not: JSON.parse rejects it, so strip the BOM before converting.

See category