JSON Formatter and Validator

Runs in your browser: nothing is uploaded

How to format and validate JSON

Paste your JSON on the left. The formatted version appears on the right as you type, and the line under the boxes tells you whether it is valid. Switch to Minify for the most compact version, choose your indent, and tick Sort keys when you want to compare two payloads side by side.

If something is wrong, we give the line, the column and what to do about it. Show me jumps to the exact character.

A client-side JSON validator, with no upload

API responses, config files and log lines often hold customer data, access tokens and internal hostnames. A validator that sends your JSON to a server has now seen all of it.

Ours parses the text in your browser. Nothing is uploaded, nothing is logged, and the page keeps working with the network off. What you paste is forgotten when you close the tab.

Common JSON errors and how to fix them

What we reportWhat went wrongFix
Trailing comma[1, 2, 3,]Remove the last comma
Single quotes{'name': 'Sam'}Use double quotes
Keys must be in quotes{name: "Sam"}Write "name"
Must be lower caseTrue, None (copied from Python)true, null
No comments// noteDelete the comment
Expected a commaTwo values with nothing between themAdd the comma

The classic "Unexpected token" message from a browser console tells you none of this. That is why we wrote our own parser.

Big numbers stay exactly as you wrote them

Most formatters read your JSON into JavaScript and write it back out. JavaScript cannot hold whole numbers above 9,007,199,254,740,991 exactly, so an ID such as 9007199254740993 quietly becomes 9007199254740992. Twitter-style snowflake IDs and 64-bit database keys are all in that range.

We never convert numbers. Each one is copied through as text, digit for digit. Load the sample to see it.

Duplicate keys

{"id": 1, "id": 2} is legal JSON, but different programs disagree on which value wins. We format it and warn you, because it is nearly always a mistake.

Format or minify?

Format for people: code review, documentation, a ticket. Minify for machines: it strips the whitespace so the payload is smaller on the wire. The data is identical either way.

Last reviewed November 15, 2026.