Paste JSON to format it neatly, minify it, or find the exact line where it’s broken. Everything runs in your browser, so API keys and private data never leave your device.

Loading the tool…

How to use it

  1. Paste your JSON into the box.
  2. Choose 2-space or 4-space indentation, or minify to remove all spaces.
  3. If the JSON is invalid, you’ll see the error and the line it’s on.

Common JSON errors

Problem Example Fix
Trailing comma {"a":1,} Remove the last comma
Single quotes {'a':1} Use double quotes
Unquoted key {a:1} Quote the key: "a"
Comments // note JSON doesn’t allow comments

Example

{"name":"Free Online Tools","tools":["json","pdf"],"free":true} becomes a neatly indented block with each key on its own line, which makes API responses and config files much easier to read.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Formatting and validation happen entirely in your browser.

What's the difference between formatting and minifying?

Formatting adds line breaks and indentation for reading. Minifying removes them to make the file smaller.

Why is my JSON invalid?

The most common causes are trailing commas, single quotes, unquoted keys and comments, none of which JSON allows.

Can it handle large files?

Yes, files of several megabytes usually work fine in a modern browser.

Sources

Last updated: