JSON Lines (JSONL) Viewer & Converter

Open or paste a JSONL or NDJSON file, see every record in a table or one at a time, find the lines that fail to parse, and convert to a JSON array or CSV.

Last updatedHow we build & check our tools
Results will appear here once you enter your values.

What JSON Lines is and why it is everywhere

JSON Lines (also called JSONL, and nearly identical to NDJSON) stores one complete JSON value per line, separated by a newline. There is no enclosing array and no commas between records. That small change makes a big difference in practice:

  • Streaming. A program can read, process and discard one line at a time, so a 20 GB file never has to fit in memory.
  • Appending. Writers add a record by appending a line, without rewriting a closing bracket. That is why structured logs from tools such as Docker, Bunyan, Pino and many cloud logging exports use it.
  • Parallel work. Files can be split on newlines and processed on many machines, as BigQuery, Spark and Hadoop do for newline-delimited JSON imports.
  • Machine learning datasets. Fine-tuning files for OpenAI, Anthropic Bedrock and Hugging Face datasets are JSONL, with each line holding one training example such as a messages array.

How this viewer reads your file

Each line is parsed on its own with a strict JSON parser. A line that fails does not stop the others: it is listed with its line number and the parser's message, so you can jump straight to it in your editor. Blank lines are skipped, a trailing newline at the end of the file is expected, Windows CRLF line endings are accepted, and a UTF-8 byte order mark at the start is removed.

The Table view uses the union of top-level keys from all records as columns, in the order they first appear, and shows nested objects and arrays as compact JSON. It displays the first 200 rows so very large files stay responsive; the exports always include every record. The Record view pretty-prints one record at a time, which is easier for deeply nested chat transcripts.

Conversions: JSON array wraps all valid records in brackets. CSV follows RFC 4180: fields containing commas, quotes or newlines are quoted and inner quotes doubled, rows end with CRLF, and records that are not objects go in a value column. To go the other way, paste a JSON array and choose Convert JSON array to JSONL.

Common JSONL mistakes

  • Pretty-printed records. A record spread over several lines is invalid JSONL, because each line must be a complete value. Minify each record to a single line.
  • Trailing commas after a record, often left over from converting a JSON array by hand.
  • Literal newlines inside strings. A newline in text must be written as \n; a raw line break splits the record in two.
  • Wrong encoding. JSON Lines must be UTF-8. Files saved as UTF-16 from some Windows tools show as garbage or fail on every line.
  • Fine-tuning format errors. Training uploads usually reject the whole file for one bad line, so check the Invalid lines count is 0 before uploading.

Frequently Asked Questions

Common questions about the JSON Lines (JSONL) Viewer & Converter

They describe the same format: one JSON value per line, UTF-8, newline separated. NDJSON's spec explicitly allows CRLF line endings; this viewer accepts both, and the .jsonl and .ndjson extensions open the same way.
From the same team

Turn your GPU into an OpenAI-compatible API endpoint

Wide Area AI routes your LLM API calls to your own hardware over a Cloudflare Tunnel — free local inference with edge caching and automatic cloud failover. Works with any OpenAI SDK.

Start routing — free

Sources & References

JSON Lines format

Definition of JSON Lines: UTF-8, one JSON value per line, newline separator

NDJSON: Newline delimited JSON specification

NDJSON rules including CRLF tolerance

RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format

JSON grammar used to parse each line

RFC 4180: Common Format and MIME Type for CSV Files

CSV quoting and line ending rules used for export