JSON formatter & validator

Paste messy or minified JSON to beautify, validate or minify it — privately, in your browser.

What a JSON formatter actually does

JSON (JavaScript Object Notation) is the lingua franca of the modern web — every REST API, config file and front-end state blob speaks it. But the JSON that travels between machines is usually minified: stripped of whitespace to save bandwidth, and almost impossible to read. A formatter parses that text into a real data structure and prints it back out with consistent indentation, so you can scan keys, spot the shape of nested objects, and catch mistakes at a glance.

Just as importantly, parsing is a validation step. If your JSON has a syntax error, it can’t be parsed — and this tool tells you exactly where it broke instead of failing silently inside your application.

The mistakes that break JSON

JSON parsers are deliberately strict. These four issues account for most “invalid JSON” errors:

  • Single quotes. Strings and keys must use double quotes. {'name': 'Ada'} is invalid; {"name": "Ada"} is correct.
  • Trailing commas. [1, 2, 3,] fails — remove the comma after the final item.
  • Unquoted keys. {age: 36} is a JavaScript object, not JSON. Every key needs double quotes.
  • Comments. JSON has no comment syntax. Strip // and /* */ before parsing.

The six JSON data types

TypeExample
String"hello"
Number36, -2.5, 1e3
Booleantrue / false
Nullnull
Array[1, 2, 3]
Object{"k": "v"}
Working with secrets? Because everything runs in your browser, it’s safe to paste JSON containing API keys or personal data here — none of it is transmitted or stored.

Frequently asked questions

Is my JSON sent to a server?

No. Formatting, validating and minifying all happen in your browser using the native JSON parser. Your data never leaves your device, which makes this safe for payloads that contain API keys, tokens or personal data.

Why does my JSON say it is invalid?

The most common causes are single quotes instead of double quotes, a trailing comma after the last item, unquoted keys, or comments — none of which are allowed in strict JSON. The error message shows the position so you can jump straight to the problem.

What is the difference between formatting and minifying?

Formatting (beautifying) adds indentation and line breaks so the structure is easy to read. Minifying removes all unnecessary whitespace to make the payload as small as possible for transmission. Both produce the same data.

Does formatting change my data?

No. It only re-serialises the same parsed structure with different whitespace. Key order is preserved and values are untouched.