JSON Lines Formatter

Validate one JSON value per line, then pretty print or compact every record.

Your JSON Lines

Valid records: — · Bad lines: —

Union of keys

—
Each line is parsed on its own, so one broken record never hides the rest of the file.

How to use the JSON Lines Formatter

  1. Paste your JSON Lines data, one record per line.
  2. Choose pretty printing or one compact line per record.
  3. Read the record count, the bad line numbers and the union of keys.

Features

Advertisement

Frequently Asked Questions

Common questions about the free online json lines formatter.

JSON Lines, also called NDJSON, stores one complete JSON value per line so the file can be read and appended record by record.
A single invalid line is reported with its line number while every other record still formats correctly, which is exactly how log pipelines behave.
Any non-empty line that is not valid JSON, for example a missing closing brace, a trailing comma or an unquoted key.
Yes. Any valid JSON value is accepted on a line, including arrays, strings, numbers, booleans and null.
Every top level key found in the object records is listed once with the number of records that contain it.
No. Empty and whitespace only lines are skipped, so a trailing newline never counts as an error.
No. Parsing and formatting happen in your browser, so your records never leave your device.
Yes, the JSON Lines formatter is completely free with no account and no limits.

Last updated: October 10, 2026