JSON to NDJSON

Write each array element as a separate JSON line for logs or imports.

Input

Processed on your device

How to convert JSON to NDJSON

Convert a JSON array into newline-delimited JSON for logs, batch imports or individual record processing.

  1. Paste a top-level array and convert.
  2. Check that each output line has one complete compact JSON value, then download the NDJSON file.
Example input
[{"sku":"00104","item":"Notebook"},{"sku":"00105","item":"Pencil"}]

Example use

Transform a sample customer-free inventory dataset into a fixture for a line-based database import.

Output and compatibility

Array order determines line order. The output has no outer brackets or commas between records. A top-level object is not a record list unless you first extract the nested array you intend to use.

Troubleshooting

If the tool asks for an array, locate the list within your document. Keep long identifiers as quoted strings if their exact digits matter.

Check the source’s structure using JSON Viewer when you are looking for its records.

Frequently asked questions

Will nested arrays inside a record create extra lines?

The value is serialized as one compact line, with line breaks inside strings escaped.

Can I merge it back to an array?

Use NDJSON to JSON.

Find a tool