JSON Formatter & Validator
Paste JSON to beautify, minify or validate it. Errors point to the exact line and column.
Input
Output
About this JSON formatter
JSON (JavaScript Object Notation) is the most common format for APIs and config files. Minified JSON is hard to read, and one missing comma breaks a whole file. This tool parses your input with the browser's native JSON parser, so the result matches what your code will see.
Features
- Format re-indents with 2 spaces, 4 spaces or tabs.
- Minify strips all whitespace to make payloads smaller.
- Sort keys orders object keys alphabetically at every level, which makes diffs cleaner.
- Validate reports the line and column of the first syntax error.
- To compare two JSON documents, use the JSON Diff tool. It ignores key order and formatting.
Is my data safe?
Yes. Everything happens in your browser with JavaScript. Nothing you paste is sent to a server.