JSON Formatter & Validator
Format messy JSON so it is easy to read, minify it for production, and find syntax errors quickly.
Use the JSON Formatter & Validator
Loading tool…
How to use the JSON Formatter & Validator
- Paste your JSON.
- Choose an indentation and whether to sort keys.
- Press Format, Minify or Validate.
- Copy the result or download it as a .json file.
About this tool
The tool uses your browser's built-in JSON parser, so it follows the official JSON standard exactly. Errors show the line and column so you can fix them fast.
Free to use. Your inputs are processed in your browser and are not sent to our servers. Results are for general information; see the disclaimer.
Frequently asked questions
Why does my JSON fail with single quotes?
Standard JSON requires double quotes around keys and text values. Single quotes and trailing commas are common causes of errors.
Is my data sent anywhere?
No. It is processed in your browser and not uploaded to our servers, so it is safe for configuration files.
How large a file can I format?
Several megabytes is fine on most devices. Very large files depend on your device's memory.
Working with JSON safely
JSON is the most common format for sending data between websites and apps. A formatter adds indentation so a long single line becomes readable, and a validator finds the exact place where the structure is broken.
Most JSON errors come from a few small mistakes. Fixing them usually takes a minute once you know what to look for.
Practical tips
- Keys and text values must use double quotes, not single quotes.
- No trailing comma after the last item in an object or list.
- Strings cannot contain raw line breaks. Use \n instead.
- Minify JSON before you send it over a network, and format it when you need to read or debug it.