JSON Lines / NDJSON

Input
Output

JSON Lines and NDJSON Converter

JSON Lines (also called NDJSON or JSONL) puts one JSON value on each line, as in log files, streaming APIs and BigQuery exports. Turn an array into lines, or lines back into one array.

Example: an array of log records as JSON Lines

An array of records, as an API or a database export gives it. Each record goes on its own line, minified, which is what log shippers, BigQuery and streaming tools expect:

Input

[
  {
    "ts": "2026-10-29T10:00:01Z",
    "level": "info",
    "msg": "server started"
  },
  {
    "ts": "2026-10-29T10:00:07Z",
    "level": "error",
    "msg": "db timeout",
    "ms": 5000
  },
  {
    "ts": "2026-10-29T10:00:09Z",
    "level": "info",
    "msg": "GET /v1/orders 200"
  }
]

Output

{"ts":"2026-10-29T10:00:01Z","level":"info","msg":"server started"}
{"ts":"2026-10-29T10:00:07Z","level":"error","msg":"db timeout","ms":5000}
{"ts":"2026-10-29T10:00:09Z","level":"info","msg":"GET /v1/orders 200"}

How do I use the JSON Lines / NDJSON?

  1. Paste a JSON array, or choose JSON Lines → JSON and paste lines.
  2. Read the result in the Output box.
  3. Copy it or save it as .jsonl or .json.

What does the JSON Lines / NDJSON do?

  • Both directions
  • Reports which line is broken
  • Blank lines are skipped

When to use the JSON Lines / NDJSON

JSON Lines (also called NDJSON) puts one JSON value on each line. It's the format of most structured logs, BigQuery and mongoexport exports, OpenAI batch files and many streaming APIs, because a program can read and write it one record at a time without holding the whole file. A normal JSON array is easier to read and to load in one go.

Turning an array into lines writes each item minified on its own line, as in the example above. Reading lines back gives one array; blank lines are skipped, and a line that isn't valid JSON is reported with its line number instead of failing silently. For files too big for the editor, use the Large file viewer, which converts in both directions while reading a piece at a time.

Frequently asked questions

Is NDJSON the same as JSON Lines?
Yes. They're two names for the same format: one JSON value per line, separated by \n. Files usually end in .jsonl or .ndjson.
Why does it say a line isn't valid JSON?
That line is cut off or isn't JSON, often a stray log message or a record split across two lines. The error names the line, so you can fix or delete it and convert again.
Is NDJSON the same as JSON Lines?
Yes, they are two names for the same format: one JSON value per line.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has 108 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.7 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram