JSON Formatter and Validator
Format, minify and validate JSON with clear error messages.
About this JSON formatter
Paste or upload JSON to make it readable, shrink it, or find out exactly why it does not parse. The checker names the first problem in plain words with its line and column, and the editor marks the spot. Everything runs in your browser, so private API responses and config files stay on your device.
How to use it
- Paste JSON into the Input box, or choose Upload file to open a .json file.
- Choose Format for readable output with 2 spaces, 4 spaces or tabs, or Minify for the smallest size.
- If the JSON is invalid, click the error message to jump to the line and fix it.
- Copy the result or download it as a file.
Common JSON errors
- Trailing comma
[1, 2, 3,]Remove the comma after the last item in an array or object.- Missing comma
{"a": 1 "b": 2}Put a comma between every two values or properties.- Single quotes
{'name': 'Ada'}JSON strings and property names must use double quotes.- Unquoted property names
{name: "Ada"}Wrap every property name in double quotes.- Comments
{"a": 1 // note}JSON has no comments. Remove them or move the note into a property.- Values JSON does not know
{"a": undefined, "b": NaN}Use null, a number, a string, true or false instead.
Frequently asked questions
Is my JSON uploaded anywhere?
No. Formatting, minifying and validation run in your browser. The JSON you paste or upload is never sent to a server.
What is the difference between Format and Minify?
Format adds line breaks and indentation so people can read the JSON. Minify removes all optional spaces and line breaks, which makes the file as small as possible for sending or storing.
How large a file can I format?
You can upload files up to 20 MB. Large inputs are processed in the background, so the page stays responsive while it works.
Why is my JSON invalid when JavaScript accepts it?
JavaScript object literals allow single quotes, unquoted keys, trailing commas and comments. JSON allows none of these. The error message shows the line and column of the first problem, and clicking it jumps there.
Does formatting change my data?
No. Only spaces and line breaks change. Keys stay in their order, numbers keep their exact digits (so 1.0 stays 1.0 and very large IDs are not rounded), escape sequences in strings are kept, and repeated keys are not removed.