Everyday Tools
JSON formatter and validator
Paste messy or minified JSON to instantly beautify it with clean indentation, validate the syntax with precise error messages, or minify it back down — all in your browser.
Format, validate, and minify JSON
JSON (JavaScript Object Notation) is the lingua franca of web APIs and config files, but it's easy to break: one trailing comma or a single quote where a double quote belongs, and the whole document is invalid. This formatter parses your input, tells you immediately if it's valid, and re-indents it so nested objects and arrays are easy to read.
When you need the opposite — the smallest possible payload for an API request or a compact config value — minifying strips every unnecessary space and line break while keeping the JSON valid. Because all of this runs locally in your browser, you can safely paste API responses, tokens, or private config without anything being sent to a server.
Common JSON errors and fixes
- • Trailing comma — remove the comma after the last item in an object or array.
- • Single quotes — JSON requires double quotes for both keys and string values.
- • Unquoted keys — every key must be wrapped in double quotes.
- • Comments — JSON has no comment syntax; remove
//and/* */lines. - • Missing commas — separate every key/value pair and array item with a comma.
Frequently asked questions
- How does the JSON formatter work?
- It parses your input as JSON and re-outputs it with proper indentation. If there are syntax errors, it displays the specific parsing error so you can find the problem quickly.
- Can I minify JSON?
- Yes. The Minify button removes all whitespace and line breaks, producing the smallest valid JSON — useful for reducing payload size in APIs and config files.
- Is the data processed locally?
- Yes, all JSON parsing and formatting happens directly on your device. Your data is never uploaded, which makes this safe for sensitive API responses and config files.
- What's the difference between formatting and validating JSON?
- Validating checks whether your text is syntactically correct JSON. Formatting (beautifying) takes valid JSON and re-indents it for readability. This tool does both at once — it validates as it formats.
- Why is my JSON invalid?
- The most common causes are trailing commas, single quotes instead of double quotes, missing commas between items, unquoted keys, and comments (JSON doesn't allow them). The error message points to where parsing failed.
- What indentation does it use?
- Formatted output uses standard two-space indentation, the most common convention for JSON in web development and configuration files.