JSON Formatter & Validator
Paste, type, or upload JSON to instantly format, validate, or minify it. Handles common mistakes like unquoted keys automatically.
Input
Output
Valid JSON ✓
What this tool does
This JSON formatter takes raw or minified JSON and outputs clean, indented, human-readable JSON. It validates against RFC 8259, reports exact error positions, and smartly fixes common mistakeslike unquoted keys, single quotes, and trailing commas — showing you exactly what it corrected.
How to use it
- Paste JSON into the input, or click Upload to load a .json file.
- Click Format to beautify, Minify to compress, or Validate to check.
- If your JSON has issues (unquoted keys, etc.), the tool auto-repairs it and tells you what it fixed.
- Click Copy to grab the output to your clipboard.
Smart repair
{name: value}→{"name": "value"}{'key': 'val'}→{"key": "val"}[1, 2, 3,]→[1, 2, 3]
Limitations
Auto-repair handles the most common issues but can't fix all malformed input. It does not support JSON5 comments or deeply nested structural errors. Very large files (50MB+) may be slow due to browser memory limits.
Frequently Asked Questions
Does this tool send my JSON to a server?
No. All formatting, validation, and minification happens entirely in your browser using JavaScript. Your data never leaves your device — nothing is uploaded, stored, or logged.
What JSON features are supported?
The tool supports the full JSON specification (RFC 8259): objects, arrays, strings, numbers, booleans, and null. It does not support JSON5, comments, trailing commas, or unquoted keys — those are not valid JSON.
Can I format large JSON files?
Yes. The formatter runs in your browser and can handle files up to several megabytes. Very large files (50MB+) may cause the browser tab to slow down temporarily while processing.
What does the minify option do?
Minify removes all unnecessary whitespace (spaces, tabs, newlines) from your JSON, producing the smallest possible valid output. This is useful for reducing payload size in APIs or config files.
How is the indent level used?
The indent level controls how many spaces are used for each nesting level when formatting. Common choices are 2 spaces (compact but readable) or 4 spaces (more spacious). Tab indentation is also available.
What do the stats mean?
The stats panel shows a breakdown of your JSON structure: total keys, nesting depth, and counts of each value type (strings, numbers, booleans, nulls, arrays, objects). It also shows the formatted size in bytes.
Related tools
More free, private, browser-based utilities — no upload, no sign-up.

Davemi Tools