Skip to content
§
§ · free tool

JSON formatter & validator. Errors down to the column.

Beautify, minify, validate, sort keys and escape/unescape JSON — with exact error line + column and a foldable tree view. Parsed entirely in your browser: no upload, no account.

A free online tool by Digital Heroes

Files never leave your browser. Nothing is uploaded.

Result Waiting for input…

              
            

Strict JSON, parsed on your device

Paste JSON or drop a .json file (up to 15 MB): the parser checks it against strict-JSON rules, pretty-prints with your choice of 2-space, 4-space or tab indent, and can sort keys alphabetically. Parse errors show the exact line and column with a caret under the broken character. One click minifies, escapes a document for embedding inside another JSON string, or unescapes a quoted string back to raw text — and a foldable tree view shows per-node key and item counts. Everything runs locally, so it even keeps working offline.

§ 02 · what you can do

One toolbar, every JSON chore.

BeautifyPretty-print with 2-space, 4-space or tab indent — pick the convention your codebase uses.
MinifyCollapse a document to a single line for compact payloads and API requests.
Validate with positionsParse errors show the exact line and column, with a caret pointing at the broken character.
Sort keysRecursively order object keys alphabetically to make two responses diff-friendly.
Escape & unescapeStringify a document for embedding inside another JSON string — or reverse it.
Tree viewFold and unfold the structure, with key and item counts shown on every node.
§ 03 · how to use it

Four steps, no manual.

  1. Paste JSON into the input pane — or drop a .json file (up to 15 MB) on the Load .json button. The status pill live-checks validity as you type.
  2. Click Beautify, Minify or Validate; choose 2-space, 4-space or tab indent and tick Sort keys to normalize key order.
  3. If parsing fails, jump to the exact line and column shown in the result pane — a caret points at the broken character. The Tab key indents inside the editor instead of moving focus.
  4. Switch to Tree view to fold the structure, then Copy the result or Download .json.
§ 04 · faq

Frequently asked questions.

Is the JSON I paste sent anywhere?
No. The page uses the browser's native JSON.parse and JSON.stringify, and both run entirely on your device. Safe for JSON containing API keys, customer records or internal config — nothing is uploaded, and there is no sign-up.
What does “Sort keys” do?
It recursively re-orders every object's keys alphabetically (case-insensitive). Sort two API responses and their diff collapses to genuine differences instead of key-order noise. Arrays are never re-ordered — order is meaningful there — only object keys move.
What's the difference between Escape and Unescape?
Escape converts JSON-special characters (quotes, backslashes, newlines, tabs) into their backslash-escaped form so the result can sit inside a JSON string value — useful for embedding one JSON document inside another. Unescape reverses it: a JSON-quoted string becomes the original raw text. Both work on the whole textarea content.
How do you find parse errors?
When JSON.parse throws, the browser reports a character position (Chrome, Edge), a line and column (Firefox), or only a quoted fragment of the broken source. We normalize all three forms, compute the line and column, and render a numbered snippet with a caret under the exact character. Typical culprits: trailing commas, single quotes, unquoted keys, embedded comments.
Why no JSON5 / JSONC support?
JSON5 (comments, trailing commas, unquoted keys) and JSONC (the tsconfig.json variant) follow different parse rules. This tool targets strict JSON per RFC 8259 because that is what every API accepts. Paste JSON5 and the error message will point at the construct — usually a comment or trailing comma — that needs removing.
What's the maximum size?
Pasted input is limited only by your browser's memory; the file loader caps at 15 MB. Modern browsers handle 10–50 MB documents in a few hundred milliseconds, though the textarea gets sluggish well before that. For 100 MB+ files, use jq or a streaming parser at the command line.

Published · Last updated .

Online now

Hey there 👋 How can we help you today?