Runs in your browser

JSON Formatter

Format, minify and validate JSON.

Part of the Developer Tools bot
Processed in your browser
Drop a .json file

About the JSON Formatter

Format, validate and minify JSON in your browser. Errors are explained in plain English with the exact line and column, large files are processed in the background without freezing, and nothing you paste is ever sent anywhere.

How to format and validate JSON

  1. Paste JSON, open a .json file, or drop one in.
  2. It's validated as you type. Errors show the exact line and column, with a plain-English explanation.
  3. Choose Format or Minify, indentation and key sorting.
  4. Copy the result or download it as a .json file.

Errors you can actually fix

Instead of “Unexpected token”, you get messages like “Trailing comma before } is not allowed” or “Property names must be in double quotes”, with the line and column and a pointer to the spot.

Big files, no freezing

Large inputs are processed in a background thread, so the page stays responsive even with multi-megabyte files.

Safe for secrets

API responses and config files often contain tokens and personal data. Here, nothing leaves your browser.

Questions

Is my JSON sent anywhere?

No. Parsing and formatting happen in your browser. The page can't send your data to any server.

What does “Allow comments & trailing commas” do?

It accepts relaxed JSON with // and /* */ comments, trailing commas and single-quoted strings, as used in many config files, and outputs strict, valid JSON.

Why did a long number change?

JavaScript numbers are exact only up to 9,007,199,254,740,991. Larger integers, such as some IDs, lose precision. The tool warns you when this happens; store such IDs as strings.

How large a file can I format?

Files up to 10 MB open directly. Very large files depend on your device's memory.

Also searched as: json validator · json beautifier · json minifier · format json online · json pretty print · json lint