JSON Formatter & Validator
Paste, upload or drop in messy or minified JSON — format it into clean, indented text or browse it as a collapsible tree. Validates as you type and points to the exact line and column where parsing failed.
How to use json formatter & validator
- Paste, type or upload your JSON on the left
Click Upload Data to load a .json file from disk, or drop one straight onto the input pane.
- Validate, Minify or Convert
Validate checks and pretty-prints it into the right pane at your chosen indent; Minify/Compact strips it down; Convert JSON to turns it into XML, CSV or YAML.
- Explore as a tree, then copy or download
Switch the output pane to Tree view to browse deeply nested data, then copy or download whatever's currently in the output pane.
Features
Your original JSON stays untouched on the left while Validate, Minify and Convert write their result to the right, so you can compare before and after.
Turn a JSON payload into another common format in one click, not just reformat the same JSON.
Browse deeply nested JSON as an expandable tree with type-colored values, not just a wall of text.
Invalid JSON is caught instantly with the exact line and column of the problem.
Parsing happens in your browser with the native JSON engine — your data never leaves the page, even when you upload a file.
Supported formats and limitations
Text and structured input supported by this tool.
Use cases include personal workflows, content preparation, and quick checks. Review output before relying on it for legal, financial, accessibility, or production decisions.
Frequently asked questions
Is my JSON sent to a server?
No. Validation, conversion and file uploads are all handled entirely in your browser using JavaScript's built-in JSON parser and the File API.
Why does it say my JSON is invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or a missing bracket — the status message points to the exact line and column that failed.
What's the difference between the Text and Tree output views?
Text view shows the plain-text result of Validate, Minify or Convert. Tree view is a read-only, collapsible visualisation of your input JSON's structure — useful for exploring a large or deeply nested payload without scrolling through raw text.
What does 'Convert JSON to' actually produce?
XML wraps each key as an element (array items become repeated <item> tags); CSV treats an array of objects as rows with a header of every key seen; YAML mirrors the same structure in YAML's indentation-based block style. All three run locally — nothing is uploaded.
Does Sort keys change my array order too?
No — it only alphabetises the keys within objects, applied whenever you Validate, Minify or Convert. Array item order is always preserved, since reordering an array would change its meaning.
How large a file can I format?
It handles typical API payloads comfortably. Very large files (tens of MB) may be slow because everything runs on your device, not a server.