JSON Formatter & Validator

Format, validate, minify and sort JSON with exact error locations.

StatusValid JSON ✓
Typeobject
Objects/arrays3
Size76 B → 115 B

Runs entirely in your browser — nothing you enter is uploaded.

About this tool

Paste messy or minified JSON to pretty-print it, check it is valid, find the exact line and column of syntax errors, or minify it for production.

How to use the JSON Formatter & Validator

  1. Enter the action, indent, sort keys and json.
  2. The result appears in the output box as you type.
  3. Copy the output or download it as a file.

How it works

Input is parsed with the browser’s standards-compliant JSON parser (no code is executed), then re-serialised with your chosen indentation. Sorting is recursive.

Frequently asked questions

Is my JSON sent anywhere?

No, it is processed entirely in your browser.

Does it accept comments or trailing commas?

No — those are not valid JSON (they are JSON5/JSONC). The validator will point to them.