JSON Formatter & Validator
Format, validate, repair and analyse JSON — with errors that point at the exact line.
To format JSON, paste it above and it is validated, pretty-printed and analysed instantly. You can then explore it as a collapsible tree, a table of records or a JSONPath query, and malformed input is repaired automatically — trailing commas, comments, single quotes, unquoted keys, Python literals and NDJSON.
Runs in your browser- Layout
- Two full editors side by side, auto-syncing — or detach the result and edit it independently
- Views
- Collapsible tree, formatted source, record table, structure analysis
- Repairs
- Trailing commas, comments, single and smart quotes, unquoted keys, Python True/False/None, NaN, NDJSON
- Query
- Live JSONPath filtering and full-text search across keys and values
- Errors
- Reported with exact line, column and a code frame
- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Why does my JSON fail with a trailing comma?
Can I paste a JavaScript or Python object?
How do I filter a large document?
Does the second editor update automatically?
My JSON arrived as an escaped string. Can this fix it?
Is there a size limit?
What does nesting depth tell me?
How to use the json formatter & validator
- 1Enter or paste your json.
- 2Choose the indent.
- 3Turn "Sort keys alphabetically" on or off as needed.
- 4Turn "Try to repair" on or off as needed.
- 5The result appears immediately — copy or download it.
Sources & specifications
Embed this tool
Put the working json formatter & validator on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
JSONPath TesterRun JSONPath expressions against a document and see the matches instantly.JSON FlattenerFlatten deeply nested JSON into dot-notation keys, or expand flat keys back into nested objects.JSON to TypeScript ConverterGenerate TypeScript interfaces, Zod schemas, Go structs, Python dataclasses or Rust structs from JSON.JSON ValidatorCheck whether JSON is valid, with the precise position of the error and what usually causes it.Query String to JSON ConverterConvert URL query strings to JSON and build query strings from JSON objects.Data Format ConverterConvert between JSON, YAML, XML, CSV, TSV and TOML in any direction, locally in your browser.
Last updated
More data & format tools