About this tool
What is the JSON Formatter & Validator?
The Wansify JSON Formatter is a free online tool that validates, pretty-prints or minifies JSON live as you type. It pinpoints errors by line and column, can repair almost-JSON, shows a collapsible tree, and converts JSON to YAML, CSV or TypeScript, all in your browser.
How to use it
- 1Paste JSON into the input panel, upload a .json file, or drop it onto the editor.
- 2The output updates as you type. Choose Format or Minify and an indent of 2, 3, 4 or 8 spaces or tabs.
- 3If the JSON is invalid, jump to the highlighted line or click Repair to fix common mistakes.
- 4Optionally filter by path, switch to the tree view, or pick YAML, CSV or TypeScript output.
- 5Copy the result or download it as a file.
Features
- Live formatting and validation as you type
- Exact error line and column with the faulty line highlighted
- Repair comments, trailing commas, single quotes, unquoted keys and unclosed brackets
- Pretty-print with 2, 3, 4 or 8 spaces or tabs, or minify to one line
- Large numbers are kept exactly, never rounded
- Collapsible tree view with click-to-copy paths
- Filter with paths like $.users[0].name or items[*].id
- Convert JSON to YAML, CSV, TypeScript interfaces or an escaped string
- Unescape stringified JSON and detect duplicate keys
- Sort object keys A to Z, including nested objects
- Upload or drag and drop .json files; input is saved in this browser
FAQ
Common questions about the JSON Formatter & Validator
How do I format JSON online?
Paste your JSON into the Wansify JSON Formatter, choose an indent size and click Format. The formatted JSON appears in the output panel, ready to copy or download.
How can I check if my JSON is valid?
Click Validate. Valid JSON shows a success message; invalid JSON shows the parser error, such as an unexpected token or trailing comma.
What is the difference between formatting and minifying JSON?
Formatting adds line breaks and indentation so JSON is easy to read. Minifying removes all unnecessary whitespace so the JSON is as small as possible for APIs and storage.
Is my JSON uploaded to a server?
No. The tool runs entirely in your browser, so nothing you enter or upload is sent to a Wansify server.
Is the JSON formatter free?
Yes. It is free to use with no sign-up.
More free tools
Need something built?