JSON Formatter & Validator
Beautify, minify and validate JSON with clear error messages.
How to use: Paste your JSON, then choose Format, Minify or Validate. Errors show with a clear message.
How to use the JSON Formatter & Validator
JSON (JavaScript Object Notation) is the most common format for exchanging data between web services, apps and configuration files. Machine-generated JSON is often squashed onto a single line, which makes it almost unreadable, and a single missing comma can break an entire request.
Paste your JSON on the left and press Format to indent it neatly using two spaces, four spaces or tabs. Press Minify to remove all unnecessary whitespace and shrink the data for transmission. Validate only checks the syntax and leaves the output untouched. If you tick the sort option, object keys are put in alphabetical order, which is handy when comparing two files.
When the JSON is invalid, the message shows what the parser found and, where your browser provides it, the line and column of the problem. The most frequent causes are trailing commas, single quotes instead of double quotes, unquoted keys and missing brackets. After a successful run you will also see a summary with the root type, number of keys, nesting depth and size.
Parsing happens entirely in your browser, so API keys, personal data and internal payloads are never uploaded. Be aware that very large files of many megabytes may slow down older devices.
Frequently asked questions
Why is my JSON invalid?
Common mistakes are trailing commas, single quotes, unquoted property names, comments and missing brackets. Standard JSON does not allow any of these.
Does formatting change my data?
No. Formatting only changes whitespace. The only exception is the optional key sorting, which changes the order of object keys.
Is my data sent to a server?
No. Everything is processed locally in your browser.