Tool

JSON & JSONL formatter and validator

Format, minify and validate JSON with line-column errors, tree view with copyable JSONPath, or JSONL mode that checks every line — all in your browser.

Input

Processing: parsing, formatting and validation run entirely in this browser tab — your JSON is never sent, stored or written into links.

0 / 2,000,000

How it works

Paste, pick a mode, done. Single-document mode formats with 2-space, 4-space or tab indentation, minifies to one line, validates with the exact line and column of the first syntax error, and renders a collapsible tree where every node has a ⧉ button that copies its JSONPath — like $.data.models[0].price.

JSONL mode checks every line on its own. Each line is parsed independently, blank lines are legal per the NDJSON convention, and every failed record is listed with its line number, column, parser message and a preview — one bad record never hides the rest. The error list exports as a .txt file. Format rewrites the file as one compact record per line only when every line parses.

Conversions are never silent. If the whole input is wrapped in a Markdown code fence, or is itself an escaped JSON string, the tool offers the mechanical un-wrap as a button — the original text stays in undo history and the change is spelled out. It never guesses at repairs like removing commas or quoting keys.

Size and privacy. Paste up to 2,000,000 characters or open a .json/.jsonl/.ndjson/.txt file up to 8 MB — read locally. Inputs over about 400 KB parse in a background worker so the page stays responsive. Nothing is uploaded, ever; the draft restore uses this browser's local storage only.

FAQ

Is my JSON uploaded or stored anywhere?

No. Parsing, formatting and validation run entirely inside this browser tab — nothing is sent to a server, stored, or written into a link. Files you open are read locally with FileReader. Closing the tab discards everything; the draft restore uses this browser's local storage only.

Where exactly is the syntax error?

The first error is reported with a 1-based line and column plus a context snippet. When the browser's JSON.parse message carries no position, the tool rescans the text itself to find the first character that breaks the grammar — so 'Unexpected token' errors still get a location.

How does JSONL mode work?

Each line is parsed as an independent JSON value. Blank lines are legal per the NDJSON convention. Failed records are listed with line number, column, parser message and a preview, and the list exports as a .txt file. Format only rewrites the file — one compact record per line — when every line parses.

My JSON came out of ChatGPT wrapped in ``` fences — now what?

The tool detects a full-input Markdown code fence (```json … ```) and offers to unwrap it with one click. The same applies when the whole paste is an escaped JSON string. Both conversions are mechanical, described before you confirm, and the original stays in the editor's undo history — nothing is rewritten silently.

Why won't it fix my trailing commas or unquoted keys?

Deliberately: silent repairs change your data. The only conversions offered are fence removal and one level of unescaping — mechanical unwraps that cannot alter the payload. Everything else stays an error with a precise location so you fix it intentionally.

How do I get the JSONPath of a field?

Open the tree view — every node has a ⧉ button that copies its path, like $.data.models[0].price. Root is $, object keys become .key, array indexes become [n].

How big a file can it handle?

Paste up to 2,000,000 characters; local files up to 8 MB. Inputs over roughly 400 KB parse in a background worker so the page stays responsive. Very large trees render the first 4,000 nodes only.

Related: JSON ↔ CSV converter

Related: JWT decoder — inspect header, payload and expiry locally