JSON formatter and validator

Beautify or minify JSON, check that it is valid and see exactly where a syntax error is.

Format

Last updated: October 2026 · Report a calculation error

How to format and validate JSON

Paste your JSON — the tool checks it and formats it with 2- or 4-space indentation, or minifies it to one line. If there’s an error, you get the parser’s message pointing at the problem. Data never leaves your browser, so you can safely paste API responses containing data.

Common JSON mistakes

MistakeWrongRight
single quotes{'a': 1}{"a": 1}
unquoted key{a: 1}{"a": 1}
trailing comma[1, 2, 3,][1, 2, 3]
comments{"a": 1 // note}JSON has no comments
undefined, NaN{"a": undefined}{"a": null}

Pretty-print or minify?

Indentation makes config files and API responses easier to read and compare. Minifying removes spaces and line breaks — the file is smaller, which matters when sending it over the network or storing it in a database.

Frequently asked questions

Can JSON have comments?

No — the JSON standard doesn’t allow them. Some tools accept JSONC or JSON5, but a standard parser reports an error.

How is JSON different from a JavaScript object?

JSON is a text format with stricter rules: keys always in double quotes, and no functions, undefined or comments.

See alsoWhole category

  1. IT-01Base64 encoder and decoderEncode text to Base64 or decode a Base64 string back to text.
  2. IT-03HEX / RGB / HSL color converterConvert colors between HEX, RGB and HSL with a live preview.
  3. IT-04SHA-256 hash generatorGenerate SHA-256, SHA-1 and SHA-512 hashes of any text.
  4. IT-05Unix timestamp converterConvert Unix timestamps to dates and dates to timestamps, in seconds or milliseconds.