Format, validate and minify JSON
- Free
- No sign-up
- No upload
- Works offline
Tool facts
- Opens
JSONGEOJSONJSONL- Saves as
JSON- Price
- Free, no sign-up, no watermark
- Are files uploaded?
- No. Everything is processed in this browser, on your device.
- Batch processing
- One file at a time
- Offline use
- Works without a connection once this page has loaded
- Browser
- A recent Chrome, Edge, Firefox or Safari, on computer or phone.
Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.
About JSON Formatter
JSON Formatter turns compact or messy JSON into clean, indented text that is easy to read, and checks that it is valid while you type. If the JSON is broken, it tells you the line and column where the problem starts, so you can fix a missing comma or quote in seconds.
You can also minify JSON to the smallest possible size before sending it in an API request, sort object keys alphabetically to compare two documents, and see how many keys and how many levels of nesting the document has. Paste text, open a .json file or drop one onto the page: everything is processed locally, so API responses, configuration files and tokens never leave your computer.
JSON Formatter runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.
How to use JSON Formatter
- Paste your JSON into the Input box, or open or drop a .json file.
- Choose Beautify or Minify, and pick 2 spaces, 4 spaces or tabs for indentation. Turn on Sort keys if you want keys in alphabetical order.
- Read the result in the Output box. If the JSON is invalid, the status bar shows the line and column of the first error.
- Click Copy to put the result on your clipboard, or Download to save it as a .json file.
Frequently asked questions
Is my JSON uploaded to a server?
No. The formatter uses your browser's built-in JSON parser, so the data stays on your device. You can even disconnect from the internet after the page loads.
Why does it say my JSON is invalid?
Common causes are trailing commas, single quotes instead of double quotes, comments, unquoted keys and special values such as NaN or undefined. These are allowed in JavaScript but not in standard JSON. The error message points to the line and column where parsing stopped.
What is the difference between beautify and minify?
Beautify adds line breaks and indentation to make JSON easy to read. Minify removes all unnecessary whitespace to make the file as small as possible, which is useful for network requests and storage.
How large a file can I format?
Files of several megabytes format instantly in a modern browser. Very large files (hundreds of megabytes) are limited by your device's memory.