JSON formatter and validator
Format, beautify, minify and validate JSON, with errors explained by line and column and a tree view. Your JSON is never uploaded or saved.
- Runs in your browser
- Nothing is uploaded
- Free, no sign-up
Paste or open JSON to check and format it. Nothing you add leaves this page.
How it works
The page reads your JSON character by character with its own parser, which follows the JSON standard (RFC 8259) exactly. When it finds a mistake it stops there and says which line and column, what it expected and, for the common slips, how to fix it. Browsers word and place their own JSON errors differently, which is why the page doesn't rely on them.
Valid JSON is written out again with the indent you pick, or on one line to minify it, in the same layout as JSON.stringify and most editors. Numbers, string escapes like \u00e9 and the order of keys are kept exactly as you wrote them, so long IDs such as 12345678901234567890 aren't rounded, as they are by tools built on JavaScript's own parser. Sorting keys orders them by character code at every level, as jq --sort-keys does, so capital letters come before small ones.
The tree view lets you open and close each object and array, and pick any value to copy its path (like $.items[0].price) or the value itself. Checking runs in a background worker inside this tab, so big files don't freeze the page. Spell checking is off in the box so the browser doesn't send what you paste off for checking.
Questions
How do I format and validate JSON?
Paste the JSON into the box or open a .json file. The page checks it as you type: valid JSON is shown indented with colours, and invalid JSON gets the line and column of the first mistake with a plain explanation, like a missing comma or a key without double quotes. Copy the result or download it as a .json file.
Is it safe to paste JSON with API keys or passwords into a JSON formatter?
Only into one that doesn't upload it. In 2025 security researchers found tens of thousands of saved snippets, full of passwords and keys, on two popular formatting sites, behind share links anyone could guess. This page checks and formats the JSON in your browser: it is never sent to a server, saved, or put in the page address, and there is no save or share button that could leak it.
How do I minify JSON?
Set Indent to “None (minify)”. All spaces and line breaks between values are removed, so the JSON is as small as it can be while meaning the same thing; the page shows both sizes. Spaces inside strings are kept.
Why is my JSON invalid?
The most common reasons are a comma after the last item, keys or text in single quotes or no quotes, comments, a missing comma between two values, and True, None or undefined instead of true and null. Text copied from documents and chat apps can also carry curly quotes or invisible no-break spaces. The error message names which one it is and where.
Limits
The page reads strict JSON only. Comments, trailing commas, single quotes and the other extras of JSON5 or JavaScript are reported as errors, not fixed for you. JSON Lines (one value per line) isn't read as a whole either; wrap the values in [ ] with commas.
The limit is 10,000,000 characters (about 10 MB) and 1,000 levels of nesting. Formatted text over 200,000 characters is shown without colours to keep the page quick, and the tree shows 100 members of an object or array at a time.
When the same key appears twice in one object, both are kept and the page says so; most programs keep only the last one. Files are read as UTF-8 text.
Privacy
This tool runs entirely in your browser. The files you open and what you type are never sent to a server, and nothing is stored after you close the page. See the privacy page.
Related tools
JWT decoder
Paste a JSON Web Token to read its header and claims, see when it expires and check its signature. The token never leaves your browser.
Unix timestamp converter
Turn a Unix timestamp into a date in your time zone, UTC and ISO 8601, or a date into a timestamp. Reads seconds or milliseconds, and makes Discord codes.
Cron expression explainer
Paste a cron expression like */15 9-17 * * MON-FRI to read it in plain English, check each field for mistakes and see the next run times in any time zone.