JSON Formatter & Validator
AvailableFormat, minify, sort and check JSON, with the line and column of any error.
Use the tool
Everything runs in your browser. Your text is not uploaded or stored.
About this tool
Paste JSON to format it so it is easy to read, shrink it to one line, sort its keys, or just check that it is valid. If something is wrong, the message points to the line and column where the problem starts.
How it works
- The text is parsed with your browser's own JSON parser, which follows the JSON standard strictly.
- Formatting uses 2 or 4 spaces. Minifying removes every space and line break that is not inside a string.
- Sorting orders object keys from A to Z at every level. Array order is never changed.
Common questions
Why does valid-looking JSON fail?
JSON is stricter than JavaScript. Keys need double quotes, strings need double quotes, and trailing commas, comments and single quotes are not allowed.
Is my JSON sent anywhere?
No. It is parsed in your browser and never leaves your device, so it is safe for private data. Still, avoid pasting secrets you do not need to.
Your text is processed in your browser and is never uploaded.
Related tools
Base64 Encoder & Decoder
AvailableEncode text to Base64 or decode it back, with standard and URL-safe alphabets and full Unicode support.
Developer Tools
URL Encoder & Decoder
AvailablePercent-encode a value or a whole URL, or decode one, and find broken sequences.
Developer Tools
UUID Generator
AvailableGenerate random version 4 UUIDs in bulk, in lowercase, uppercase or without hyphens.
Developer Tools
Unix Timestamp Converter
AvailableTurn a Unix timestamp into a readable date, or a date into a timestamp, in seconds and milliseconds.
Developer Tools