JSON Formatter & Validator

Beautify, validate or minify JSON with clear error messages.

How to use the JSON Formatter

  1. Paste your JSON into the box.
  2. Click “Format” to beautify it, or “Minify” to compress it.
  3. If the JSON is invalid, the error and its line and column are shown.

Common JSON errors

  • Trailing commas – {"a": 1,} is not valid JSON.
  • Single quotes – strings and keys must use double quotes.
  • Unquoted keys – {a: 1} must be {"a": 1}.
  • Comments – JSON does not allow // or /* */ comments.

Private by design

API responses and config files often contain keys or personal data. This formatter runs entirely in your browser, so nothing you paste is sent to a server.

Frequently asked questions

What does “sort keys” do?

It orders the keys of every object alphabetically, which makes two JSON documents easier to compare.

Is there a size limit?

No fixed limit. Several megabytes of JSON format quickly on most devices.

Guides & articles

💻 Developer Tools The 7 Most Common JSON Errors and How to Fix Them Unexpected token? Trailing comma? Learn the seven JSON mistakes that break APIs and config files, what the error messages mean, and how to fix each one.

Related tools