All tools

NDJSON Formatter, Validator & Converter

Data

Format, validate and convert newline-delimited JSON (NDJSON / JSON Lines): per-line validation, pretty-print or minify, convert to a JSON array or CSV, and remove duplicate records

Was this tool helpful?
ndjsonjson-linesformatvalidatestreamingdedupededuplicatecsvjson-to-csv

About NDJSON Formatter, Validator & Converter

Paste newline-delimited JSON, the format most log pipelines and streaming APIs actually use, and work with it in three modes. Format & validate checks each line independently and reports the exact line number the moment something breaks, pretty-prints or minifies the whole stream, and converts between NDJSON and a single JSON array. Deduplicate records removes repeated lines either by exact match of the whole record or by a key field you choose (such as an event id), keeping the first occurrence. Convert to CSV turns flat objects into a CSV file with a header row built from the union of keys across all lines. It is comfortable up to tens of megabytes in the browser; for multi-gigabyte logs, a command-line tool like jq is the better fit.

How to use NDJSON Formatter, Validator & Converter

  • 1.Paste NDJSON log output (one JSON object per line) to validate that every line parses correctly and spot the exact line number of a malformed entry.
  • 2.Format a minified NDJSON stream into pretty-printed, indented JSON per line for easier manual inspection.
  • 3.Convert an NDJSON file into a single JSON array when you need to load it into a tool that expects standard JSON rather than line-delimited records.
  • 4.Switch to Deduplicate records to drop repeated events from a replayed or retried stream, by full record or by an id field.
  • 5.Use Convert to CSV to open a flat NDJSON export in a spreadsheet.

Frequently asked questions

What's the difference between NDJSON and a JSON array?
NDJSON stores one complete JSON value per line with no surrounding brackets or commas, which makes it easy to stream, append to, and process line-by-line, unlike a JSON array which must be parsed as a whole.
Is my data sent to a server?
No, validation and formatting happen entirely in your browser.
Can it handle very large NDJSON files, like multi-GB log exports?
It works well for typical files up to tens of MB in the browser, but for multi-GB streaming logs you're better off using a command-line tool like `jq` that processes line-by-line without loading everything into memory.
Does it validate that each line is valid JSON, or just that the file looks right overall?
It validates each line independently and reports the exact line number if one fails to parse, since a single bad line in NDJSON shouldn't invalidate the rest of the stream.
How are nested objects handled in CSV conversion?
The CSV mode is designed for flat objects, one value per column. Flatten nested JSON first (for example with the Flatten / Unflatten JSON tool) if your records contain objects or arrays.
Why did an old Utilix tool page redirect me here?
Utilix merged several single-purpose tools into the NDJSON Formatter, Validator & Converter. Each old URL now opens this page with its mode preselected (via ?mode=<old-tool-slug>), so bookmarks and links keep working. The old tools' REST endpoints, Node.js and Python SDK functions, and MCP tools are unchanged.