Developer Tools
JSON Formatter & Validator
Validate JSON, pretty-print it, minify it, and inspect JSON paths.
17 chars
size
1
objects
0
arrays
1
keys
Formatted JSON
{
"hello": "world"
}Tree view
Expand objects and arrays to inspect nested values without losing your place.
hello:"world"JSON paths
Inspect keys and array items, then copy the path you need.
2 paths found.
$$.hello$objectObject (1 key)$.hellostringworldMinified JSON
About This Tool
Format minified or hard-to-read JSON into highlighted, indented output that is easier to inspect, debug, and share. The tool also validates the input, shows a parser error when the JSON syntax is invalid, provides an expandable tree view, and lists JSON paths for objects, arrays, and nested values.
How To Use It
- Paste JSON into the input editor.
- Choose 2-space or 4-space indentation, and turn on key sorting when you want stable object order for review or diffs.
- Use the highlighted preview, validation message, tree view, stats, and JSON path list to check the structure.
- Expand or collapse the full tree when you need to scan deeply nested JSON faster.
- Filter paths when you need a specific key or value.
- Copy the formatted JSON, minified JSON, or an individual JSON path, or send formatted or minified output back into the input for another pass.
Examples
Pretty-print an API response
Paste a compact response such as {"status":"ok","items":[1,2]} and convert it into readable nested JSON.
Find a nested value path
Expand the tree view or filter the path list for a key such as userId or items to copy the matching path for debugging, notes, or test fixtures.
Minify edited JSON
After checking and formatting a payload, use the minified result as the input or copy it when you need a compact value for a config field or request body.
Normalize JSON before a diff
Turn on key sorting to alphabetize object keys before copying formatted JSON into a code review, notes, or a diff tool.
Useful Notes
What validation checks
The parser checks JSON syntax, including quotes, commas, brackets, braces, and valid primitive values. It does not verify an API-specific schema.
How paths are shown
Simple property names use dot notation, while keys with spaces, punctuation, or other special characters use bracket notation so the path stays unambiguous.
When to use the tree view
Use the tree view when you need to follow nested objects or arrays step by step without scanning the entire formatted document.
What key sorting changes
Key sorting alphabetizes object properties at every nesting level while preserving array item order and primitive values.
Local processing
Formatting and validation use browser JavaScript, so pasted JSON is processed on the page instead of being uploaded by this tool.
FAQ
Is my JSON uploaded?
No. JSON parsing, formatting, minifying, and stats are handled in your browser.
Can this validate a JSON schema?
No. This tool validates JSON syntax only; it does not compare the data against a custom schema.
Why does valid JavaScript object syntax fail?
JSON requires double-quoted property names and does not allow comments, trailing commas, undefined, or functions.
Related Tools
Base64 Encode / Decode
PopularConvert plain text and Base64 in either direction.
URL Encode / Decode
Convert URL text to and from percent encoding.
Word & Character Counter
PopularInstant word, character, line, and reading-time counts.
CSV & JSON Converter
Convert structured CSV and JSON data in either direction.