JSON Formatter
Validate JSON, then pretty-print or minify it.
Loading the tool…
How to use JSON Formatter
Paste JSON and it is checked and laid out as you type. Pick 2 spaces, 4 spaces or tabs, sort the keys alphabetically, or minify it to a single line. If the JSON is invalid you see where the problem is.
- Paste or type your text into the Input box.
- Adjust any options above it; the result updates as you go.
- Press Copy to put the result on your clipboard, or Save to download it.
Questions
How do I know if my JSON is valid?
Valid JSON is formatted immediately. If there is a mistake, an error message says what is wrong and roughly where.
Is my JSON sent to a server?
No. It is parsed by your own browser, so it is safe to paste data you would not want to share.
Is this tool free?
Yes. JSON Formatter is free to use, with no sign-up and no limit on how often you use it.
Is what I enter kept private?
Yes. Everything you type stays in the page on your own device. Nothing is sent to a server.
More developer tools
- JSON ⇄ CSV – Convert a JSON array to CSV, or CSV back to JSON.
- Base64 Encode / Decode – Convert text to Base64 and back, with full Unicode support.
- URL Encode / Decode – Percent-encode text for a URL, or decode it again.
- HTML Entities – Escape text for HTML, or turn entities back into characters.
- Hash Generator – SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text.
- UUID Generator – Random version-4 UUIDs, one or a hundred at a time.