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

JSONL Validator

updated 25 April 2026

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

Validate

Drop a .jsonl file here, or

JSONL Validator

Paste or drop a JSONL / NDJSON file. Each line is parsed individually; every bad line reports its line number and the exact JSON parser error.

Before you start

You need a JSONL (JSON Lines) or NDJSON file, or just some raw text you want to verify. Unlike a standard JSON file which is one giant object, JSONL expects each line to be its own self-contained JSON value. I built this tool to handle the "dirty" reality of log exports and AI datasets where one broken character can ruin a whole pipeline.

Since this runs entirely in your browser, there is no file size cap, but your RAM is the limit. I've found that files up to 100 MB usually validate in a few seconds on a modern machine. If you're dealing with gigabyte-scale logs, your browser might get cranky; in those cases, consider splitting the file into chunks first.

How to use it

  1. Paste your text into the input box or drag a .jsonl file directly onto the drop zone.
  2. Click Validate to start the line-by-line syntax check.
  3. Review the error list below the controls — I'll show you the exact line number and the JSON.parse error message for every failure.
  4. If you just want to salvage the good data, click Download valid lines only to save a clean.jsonl file with the broken rows stripped out.
  5. Click Clear to reset the board for your next task.

Options explained

Download valid lines only

This is my favorite "utility" feature. Instead of manually hunting down a missing quote in a 50,000-line file, you can just tell the tool to skip the trash. It iterates through every line, attempts a parse, and only keeps the ones that succeed. It's a quick way to "repair" a corrupted export so you can get the rest of your data into your database or training run.

Example

Input with a syntax error on line 3:

{"id": 1, "status": "ok"}
{"id": 2, "status": "ok"}
{"id": 3, "status": error}

Validation Result:

Line 3: Unexpected token e in JSON at position 17

Notice that line 3 fails because error is a bare word rather than a quoted string or a boolean — standard JSON is very picky about that.

Tips & common pitfalls

Troubleshooting

The error says "Unexpected token ]" but I don't see a bracket.

JSON error messages can be a bit cryptic. Usually, this means the parser expected more data or a different character (like a comma) but hit the end of the object too early. Check the characters immediately preceding the "position" number mentioned in the error message.

My browser tab freezes on a huge file.

The validator tries to process the whole text area at once. For files over 200 MB, try clearing the text area first and using the File Input instead of copy-pasting, as browsers handle file streams much better than giant text strings.

Related tools

See also: if you need to do something adjacent on this site, try OpenAI Fine Tune Validator to validate an OpenAI fine-tune file against the chat schema, Formatter to pretty-print or minify each JSONL record, or JSONL to CSV to flatten JSONL into a CSV with dotted keys.

Frequently asked questions

Does my data get uploaded anywhere?

No. I built this to run 100% in your browser using JavaScript. The "upload" is just a local file read, and the "download" is generated using a Blob URL. Your data never touches my server. See the privacy policy for the details.

What is the difference between JSONL and NDJSON?

For almost every practical use case, they are the same thing: newline-delimited JSON. Some specifications are slightly stricter about trailing newlines or blank lines, but this tool handles both formats interchangeably without complaint.

Why didn't it catch my missing "role" key?

This is a syntax validator, not a schema validator. It checks if the JSON is "legal" to parse. If you need to check if your data follows a specific structure (like for OpenAI fine-tuning), use the OpenAI validator instead.

Is there a command-line version of this?

Yes, and it's often better for giant files. You can use jq -c . file.jsonl > /dev/null. If the file is broken, jq will bark and tell you exactly which line it couldn't handle. It's the gold standard for CLI work.