Skip to content

JSON Formatter & Validator

Beautify, minify and validate JSON with clear error messages showing the exact line and column.

This tool runs entirely in your browser. Your data never leaves your device.

About the JSON Formatter & Validator

JSON (JavaScript Object Notation) is the most common format for exchanging data between web services, apps and configuration files. Minified or hand-written JSON is hard to read, and a single missing comma or quote makes the whole document invalid. This formatter re-indents your JSON so it is easy to read, compresses it to a single line when you need the smallest size, and pinpoints syntax errors by line and column. Your data is parsed by your own browser and never sent anywhere, so it is safe to use with API responses or configuration that contains private information.

How to use it

  1. Paste your JSON into the input box, or click “Load example” to try it out.
  2. Click “Format” to beautify it with your chosen indentation, or “Minify” to remove all whitespace.
  3. If the JSON is invalid, read the error message: it shows the line and column where parsing failed.
  4. Copy the result or download it as a .json file.

Frequently asked questions

Is my JSON uploaded to a server?

No. Formatting and validation happen entirely in your browser using its built-in JSON parser. Nothing you paste is transmitted or stored.

Why is my JSON invalid?

The most common causes are trailing commas after the last item, single quotes instead of double quotes, unquoted property names and comments. Standard JSON allows none of these.

What does “Sort keys” do?

It orders the properties of every object alphabetically, at every level. This makes it easier to compare two JSON documents or to find a property in a large object.