JSON Lines / NDJSON Validator & Converter

Paste one JSON value per line to check your records and inspect their fields. Convert valid records to a JSON array or normalized JSON Lines; blank lines are ignored and invalid records are reported separately.

Runs locally in your browser
This tool processes all data locally in your browser.
JSON Lines inputUse one complete JSON value per non-empty line. No file, event, or record is uploaded.

How to check JSON Lines

Paste newline-delimited JSON and press Validate and convert. Every non-empty line is parsed on its own, so one broken record does not hide the rest: the report names the line, the column the parser stopped at, and leaves that line out of the converted output.

Blank lines, a leading byte-order mark, CRLF endings and spaces around a line are accepted. The conversion runs in this tab, and the page sends no request while it works.

  1. Paste the records into the text area, or press Load example to see the expected shape.
  2. Pick the output format: Formatted JSON array, or Normalized JSON Lines for one value per line.
  3. Press Validate and convert and read the metrics: records, valid records, invalid lines and top-level fields.
  4. Take the result with Copy or Download; both carry the complete output even when the preview is capped.

What the report shows

Reading the validation report

A line that cannot be parsed is reported in red with its line number and, when the browser's JSON parser returns a position, the column inside that line. Invalid records never reach the output, so a converted array can hold fewer records than the input had lines.

Every valid line is counted, and the top-level keys of object records are tallied in the fields panel. A line that parses to an array, a number, a string, a boolean or null is converted as it is and listed as an info item, because it has no object fields to count. Duplicate keys inside one object follow JSON.parse rules: the last value wins.

Numbers JSON cannot hold exactly

JSON has no integer type, so 12345678901234567890 arrives as the closest double and is written back as 12345678901234567000. A line holding an integer above 2^53-1 is flagged as rounded instead of passing as exact.

A number outside the range a double can represent, such as 1e999, is reported as an error: JSON.parse turns it into Infinity and the converted value becomes null.

Long inputs and the 1 MB preview

The preview stops after the first 1 MB and says so, because writing a multi-megabyte string into the text area stalls the page. Copy and Download always contain the whole result: with 100,000 records in the input, the copied text parsed back into all 100,000 records.

Measured in Chrome on this page: 1,000 lines in about 10 ms, 10,000 lines (0.4 MB) in 50-90 ms and 50,000 lines (2 MB) in 0.3-0.6 s. Memory inside the browser remains the limit for very large files.

Recent tools: