Wall of Tools

JSON Formatter and Validator: Pretty Print and Find the Error

Paste JSON to indent and colour it, or minify it. If it is broken, the tool names the problem and the exact line and column. Nothing is uploaded.

  • Runs in your browser, nothing is uploaded
  • Free, no sign-up
  • 35 automated checks
Result

Make JSON readable, and find the mistake that breaks it

JSON is the format most web services, apps and configuration files use to pass data around. It often arrives as one enormous line, which is impossible to read, or with a small mistake that stops everything: a missing comma, a quote that was never closed, a trailing comma after the last item. The error message from the program that choked on it is usually unhelpful.

Paste the JSON on the left. If it is valid, it appears on the right neatly indented and coloured, ready to read or copy. If it is not, the tool says exactly what is wrong and on which line and column, and marks that line. Nothing is uploaded, which matters when the JSON holds customer data, API keys or settings.

How to use it

  1. Paste your JSON on the left. It is checked as you type.
  2. Format spreads it over lines with indentation, so you can see its structure. Minify removes every unnecessary space and line break, for the smallest file to send or store.
  3. Sort keys puts the keys of every object in alphabetical order, which makes two versions of the same data easy to compare with Text Compare.
  4. Copy the result or download it as a .json file.

The mistakes it finds most often

  • A trailing comma after the last item in a list or object. JavaScript allows it; JSON does not.
  • Single quotes instead of double quotes around text or keys.
  • Keys without quotes, such as {name: "Ana"}.
  • A missing comma between two items, or a missing closing bracket at the end.
  • Comments. Standard JSON has no comments, so // notes make it invalid.
  • Special values such as NaN, undefined or numbers with a leading zero like 007.

For each one the message names the problem in plain words, for example "Trailing comma before ]", and shows the line and column.

Good to know

  • Big files work. Several megabytes of JSON format in about a second. The coloured view shows the first 5,000 lines; Copy and Download always give the whole result.
  • Numbers are not changed. Very long numbers and numbers such as 1.50 are copied exactly as written instead of being rounded or tidied, so IDs and prices stay exact.
  • Duplicate keys are reported as a warning: most programs silently keep only the last one, which is a common source of confusing bugs.

How this tool was tested

Before publishing, I ran 35 automated checks on the finished page in Microsoft Edge, which is built on Chromium like Chrome. Last full run: 15 November 2026.

  • Formatting: 2 and 4 spaces, tabs, minifying, sorting keys at every level, empty objects and lists, escapes and accented letters, and long numbers and prices such as 1.50 kept exactly as written.
  • 400 random documents in three styles each: the formatted JSON always means exactly the same data as the original.
  • Mistakes: trailing commas (pointing at the comma itself), single quotes, keys without quotes, missing commas and colons, unclosed text, lists and objects, comments, NaN, leading zeros and extra text, each with the right line and column.
  • Agreement with the browser: 3,000 random snippets, valid and broken, were checked by this tool and by the browser's own JSON reader. They agreed every time on which ones are valid.
  • Using the tool: the samples, the red line on the mistake, Copy and Download turned off while the JSON is broken, the minified download, HTML shown as text, and a large document formatted in about a second.

What the tests did not cover: Safari and Firefox were not tested. JSON with comments (JSON5) is reported as invalid on purpose. Something not working? Tell me on the contact page.

FAQ

Is my JSON sent anywhere?

No. It is checked and formatted in this page. You can disconnect from the internet after the page loads and it still works.

Can it fix the mistakes for me?

It shows exactly where the mistake is instead of guessing, because a wrong guess could silently change your data. Most fixes are a single character.

What about JSON Lines (one object per line)?

Each line of a JSON Lines file is its own JSON value, so the whole file is not one valid JSON document. Paste a single line to check it.

Published 16 November 2026