tools

JSON Formatter & Validator

Format, minify, sort keys and validate JSON with the exact line and column of any error.

[loading tool…]

How it works

The input goes through the browser’s own JSON.parse, the strictest parser available, then JSON.stringify with your indentation. Sort keys orders object keys alphabetically at every depth, which makes two documents easy to diff.

When parsing fails, the tool converts the engine’s error message to a line and column so you can jump straight to it.

Common errors

Message Usual cause
Unexpected token } trailing comma after the last item
Unexpected token ' single quotes: JSON needs double quotes
Unexpected token / comments: JSON has none (use JSON5 or JSONC tooling)
Bad control character a raw tab or newline inside a string: escape it as \t or \n

Limits

  • Large numbers beyond 2^53 lose precision when re-serialized, as in any JavaScript tool.
  • Files are read locally; nothing is uploaded. Big documents (tens of MB) work but take a moment.

References

esc
All tools
ADC / DAC Resolution Calculator[embedded]
Base64 Encoder / Decoder[dev]
Battery Runtime Calculator[hardware]
Chmod Calculator[dev]
CRC Calculator[embedded]
Cron Expression Builder[dev]
CSV ⇄ JSON Converter[dev]
Duty-Cycle Battery Life[embedded]
Generator Wattage Calculator[hardware]
Hash Generator[dev]
HTML Entity Encoder[dev]
JSON Formatter & Validator[dev]
JSONPath Tester[dev]
JWT Decoder[dev]
LED Resistor Calculator[embedded]
LLM Memory / VRAM Estimator[ai]
Lorem Ipsum Generator[text]
Markdown Preview[text]
Markdown Table Generator[text]
Number & Float Inspector[embedded]
Number to Words[text]
Ohm's Law Calculator[embedded]
Password Generator[dev]
Quantization Size Calculator[ai]
RC / LC Filter Calculator[embedded]
Regex Tester[dev]
Register / Bitfield Viewer[embedded]
Resistor Color Code[embedded]
Roman Numeral Converter[text]
Solar Battery Bank Sizing[hardware]
Solar Panel Output[hardware]
SQL Formatter[dev]
Subnet / CIDR Calculator[dev]
Tensor Shape Calculator[ai]
Timer / PWM Calculator[embedded]
UART Baud Rate Error[embedded]
Unix Timestamp Converter[dev]
UPS Runtime Calculator[hardware]
URL Encoder & Parser[dev]
UUID Generator & Inspector[dev]
Voltage Divider Calculator[embedded]
Voltage Drop Calculator[hardware]
Wire Size Calculator[hardware]
XML Formatter[dev]
YAML Validator & Converter[dev]
Commands
Toggle theme (auto → light → dark)
Copy link to this page
Go to all tools
Lire en français
↑↓ move↵ open⌘↵ new tab