JSON Formatter & Validator
Format, beautify, minify and validate JSON in your browser. Get the exact line and column of syntax errors. Your data never leaves your device.
Format and validate JSON safely
Paste JSON to pretty-print it with your preferred indentation, minify it for transport, or validate it. When the JSON is invalid the tool shows the line and column where parsing failed.
API responses and configuration files often contain tokens and personal data. This formatter runs locally with your browser's built-in JSON parser, so nothing is uploaded.
Frequently asked questions
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments, none of which standard JSON allows.
Does formatting change my data?
No. Formatting only changes whitespace. Very large numbers beyond JavaScript's safe integer range may lose precision, which the tool warns about.
Can I sort keys?
Yes, tick "Sort keys" to order object keys alphabetically.
More free tools
- Word Counter Count words, characters, sentences and paragraphs instantly, plus reading and speaking time. Free, private and runs entirely in your browser.
- Character Counter Count characters with and without spaces and check your text against common limits for social posts, SEO titles, meta descriptions and SMS.
- Text Case Converter Convert text to uppercase, lowercase, title case, sentence case, camelCase, snake_case, kebab-case and more in one click.
- URL Encoder & Decoder Encode or decode URLs and query string values with percent-encoding. Choose component or full-URL mode. Free and runs in your browser.