jsonlkit.com
JSONL (JSON Lines) utilities, in the browser
Say hi →

NDJSON ↔ JSONL Converter

updated 22 May 2026 · what is NDJSON? · NDJSON vs JSONL

NDJSON and JSONL are the same format — one JSON value per line, separated by \n. There is nothing to "convert" at the content level, only to normalize (strip BOM, fix line endings, drop blank lines) and to download with the file extension your downstream tool expects.

100% client-side. Your data never leaves this page — no upload, no server.

Normalize & convert

Drop a .ndjson or .jsonl file here, or

Normalized output

NDJSON ↔ JSONL Converter

Drop an NDJSON file, normalize it (BOM, line endings, blanks, optional per-record minify), then download with either extension. Use it before feeding the file to a strict ingester or a system that's picky about extensions.

Why this exists

Half of "NDJSON vs JSONL" questions on Stack Overflow are really "my downstream tool only accepts .jsonl, but my upstream emits .ndjson" — or vice versa. There is no content-level conversion needed; just rename. The other half are subtle compatibility issues that look like format mismatches but are actually:

This tool fixes all four in one pass, then lets you download with either extension.

How to use it

  1. Paste your NDJSON or JSONL into the input box, or drop a file onto the drop zone.
  2. Pick which normalizations to apply (all are on by default except minify each record).
  3. Click Normalize. The cleaned output appears below.
  4. Click Download .jsonl or Download .ndjson — the content is identical; only the file extension differs.

Options explained

Strip leading BOM
Removes the UTF-8 BOM (EF BB BF) at the very start of the file. The BOM is silently invisible in text editors but breaks many parsers, which treat it as part of the first record.
Normalize CRLF → LF
Replaces Windows-style \r\n line breaks with Unix \n. The NDJSON / JSONL spec mandates LF; most parsers tolerate CRLF, but some don't.
Drop blank / whitespace-only lines
Removes empty lines and lines containing only spaces or tabs. The spec doesn't address them; strict consumers reject them; most ingesters silently skip them. Removing them is the safest.
Ensure trailing newline
Appends a final \n after the last record if missing. Makes wc -l match the record count and avoids the "POSIX text file" warning some tools emit.
Minify each record
Re-parses each line and emits it as compact JSON (no extra whitespace). Off by default because it changes content — turn it on if you've inherited a file with pretty-ish per-line JSON or you want to shrink the file slightly. Lines that fail to parse are passed through unchanged with a warning.

Example

Input (Windows export with BOM and CRLF, blank line in the middle):

{"id":1,"name":"Ada"}\r\n
{"id":2,"name":"Babbage"}\r\n
\r\n
{"id":3,"name":"Hopper"}\r\n

Output with default options:

{"id":1,"name":"Ada"}
{"id":2,"name":"Babbage"}
{"id":3,"name":"Hopper"}

Related tools

Frequently asked questions

Is renaming .ndjson to .jsonl enough?

In most cases, yes — the file content is identical. Use this tool when you also want to scrub BOM/CRLF/blank lines, or when you want a one-click download with the right extension.

Will minifying break my data?

Only if a line wasn't valid JSON to begin with — those lines are passed through unchanged and flagged. Otherwise minify is round-trip safe.

What MIME type should the file be served with?

application/x-ndjson for both. See the JSONL specification for the MIME type discussion.

Does my data get uploaded?

No — everything runs in your browser. See the privacy policy.