JSON Formatter
Which tool?Format make it readableMinify smallest sizeLint syntax check, strict rules and duplicate keys
Overview
Pretty-print JSON without changing a single value
Pretty-print messy JSON with clean, consistent indentation. Only whitespace changes — numbers, strings and key order stay exactly as you wrote them.
Guide
How to use
- 1 Paste your JSON
Type, paste, or use the Paste button to pull JSON from your clipboard. The Sample button loads a small example to try.
- 2 Pick an indentation
Choose 2 spaces, 4 spaces, or Tab. The formatted result updates instantly.
- 3 Check the result
The pretty-printed JSON appears next to your input. If the JSON is broken, you see the line, column, and a plain-language explanation instead.
- 4 Copy or download
Use Copy to send the result to your clipboard. On the Format and Minify pages you can also Download it as a .json file.
Pitfalls
Common JSON mistakes
-
Expecting the formatter to fix errors
A formatter never guesses what you meant. If the JSON is broken it shows where — fix that spot first, then the formatted result appears.
-
Large numbers rounded by other tools
Many formatters parse numbers into JavaScript floats, so 12345678901234567890 comes back as 12345678901234567000. This formatter copies the digits exactly as written.
-
Mixing tabs and spaces
Switching indentation style creates noisy diffs. Pick the style your project already uses and keep it.
-
Duplicate keys hidden in long objects
Formatting keeps both copies of a duplicated key and points them out. Use JSON Lint to list every one before you ship the file.