← All tools
🧩

JSON Formatter & Validator

Format, beautify, validate and minify JSON online. Free developer tool, no sign-up.

Free · No sign-up
📚 Read the full guide: How to use JSON Formatter & ValidatorOpen →

How to use JSON Formatter & Validator

  1. 1. Paste JSON into the editor, click Open file to load a .json file up to 50 MB, or click Sample to try it out.
  2. 2. Errors are flagged as you type with the line, column and a caret. Click 🛠 Repair to fix comments, single quotes, trailing commas and similar issues.
  3. 3. Choose 2 spaces, 4 spaces or Tab and click ✨ Beautify, or Minify to compress; tick Sort keys to alphabetize. Switch to the Tree tab to browse.
  4. 4. Use the JSONPath query tab to filter data, then click Copy or ⬇ .json to save the formatted result.

Frequently asked questions

Is the JSON formatter free, and how large a file can it handle?

Yes, it’s free with no sign-up. You can open or drop JSON files up to 50 MB, and the Tree view loads lazily so it stays fast even on multi-megabyte files. Very large files still depend on your browser’s memory.

Is my JSON sent to a server when I format it?

No. Validation, repair, formatting, the tree view and JSONPath queries all run in your browser. Nothing is uploaded, so it’s safe to paste API responses, config files or data that contains tokens or customer details.

How do I fix invalid JSON automatically?

Click Repair. It fixes common problems such as comments, single quotes, unquoted keys, trailing or missing commas, Python-style True and None, NaN, hex numbers, JSONP wrappers, curly quotes and unclosed brackets, then lists exactly what it changed so you can review it.

How do I find the error in my JSON?

The formatter validates as you type and shows the error with its line and column number plus a caret pointing at the exact spot. Common causes are a missing comma, a trailing comma or single quotes; the Repair button can fix most of these in one click.

How do I query JSON with JSONPath?

Open the JSONPath query tab, type an expression and click Run. It supports $, recursive .., wildcards *, indexes and slices, and filters like [?(@.price > 10)] with && and ||. In the Tree view, clicking a key copies its JSONPath so you can reuse it.

What is the difference between beautify and minify JSON?

Beautify adds line breaks and indentation (2 spaces, 4 spaces or tabs) so JSON is easy to read and review. Minify removes all unnecessary whitespace to make the file as small as possible for APIs and storage. Both keep the data itself exactly the same.

Related guides

🛠️ All text & developer guides and tools →