JSON Formatter
Format, validate and minify JSON in your browser. Paste messy JSON, get readable output with a clear message when something is wrong.
How to use the JSON Formatter
- Paste your JSON. Drop the raw JSON into the input box. It is checked as you type.
- Choose the shape. Pick an indent size, or switch to minified to strip every space.
- Copy the result. Copy the formatted output straight to your clipboard.
Frequently asked questions
- Is my JSON uploaded anywhere?
- No. Parsing and formatting happen entirely in your browser with the built-in JSON parser. Nothing is sent over the network, which makes it safe to paste payloads that contain production data.
- Why does my JSON fail to parse?
- The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys, and comments. All four are valid JavaScript but none of them are valid JSON, so a parser rejects them.
- What is the difference between formatting and minifying?
- Formatting adds indentation and line breaks so a human can read the structure. Minifying removes every optional space so the payload is as small as possible over the wire. The data itself is identical either way.
- Does formatting change the order of my keys?
- No. Key order is preserved exactly as it appears in your input, because JSON objects keep insertion order when parsed and re-serialised.
Learn more
Related tools
- Developer Tools
UUID Generator
Generate random UUID v4 identifiers instantly in your browser. Create one or thousands at once, then copy them with a single click.
- Developer Tools
Base64 Encoder & Decoder
Encode text to Base64 and decode it back, right in your browser. Handles Unicode correctly and never sends your data anywhere.
- Developer Tools
HTML Entity Encoder
Encode text into HTML entities or decode entities back to characters. Escapes the five characters that break markup, safely in your browser.
- Developer Tools
JWT Decoder
Decode a JSON Web Token to inspect its header and payload, and check the expiry — all in your browser, with no token ever sent.
- Developer Tools
Password Generator
Generate strong random passwords in your browser. Choose the length and character types, then copy — nothing is ever sent over the network.
- Developer Tools
SHA Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, computed in your browser with the built-in Web Crypto API.
Last updated