← All Tools

JSON Formatter

Format, minify, validate and sort JSON data. Syntax highlighting included.

JSON Input

How to use the JSON Formatter

  1. Paste your JSON

    Paste JSON into the input, or load the sample.

  2. Format, minify or validate

    Choose 2, 4 or 8 spaces or tabs, and sort keys if you like.

  3. Copy or download

    Copy the result or download it as a .json or .txt file.

Frequently asked questions

How do I find the error in my JSON?

Press Validate. If the JSON is invalid, the parser’s error message is shown so you can locate the problem.

What is the difference between format and minify?

Format adds line breaks and indentation for easy reading. Minify removes all unnecessary whitespace for the smallest size.

Why would I sort the keys?

Sorted keys make JSON easier to scan and compare. To see exactly what changed between two files, use JSON Diff.

Is my JSON sent anywhere?

No. Everything runs locally in your browser.