JSON formatter and validator
Format, validate and minify JSON, see the exact line and column of any error, and explore it as a collapsible tree.
Runs in your browserNothing uploadedWorks offline
Loading JSON formatter and validatorRuns on this device. Nothing is uploaded.
Questions
Will it change my numbers?
No. Numbers and strings are kept exactly as you wrote them, so large IDs like 12345678901234567890 are not rounded the way JSON.parse would round them.
Does it accept comments or trailing commas?
No. It checks strict JSON as defined in RFC 8259, and tells you where a comment, trailing comma or single quote breaks it so you can fix it.
Is my JSON sent anywhere?
No. Parsing and formatting happen in your browser. Large files are processed in a background worker so the page stays responsive.
Related tools
All developer toolsDeveloperjs mjs cjsCode formatterFormat HTML, CSS, JavaScript, TypeScript, JSON, Markdown and YAML with Prettier, right in your browser, with indent and quote options.Developerjs mjs cjsJS, CSS and HTML minifierMinify JavaScript with Terser, and CSS and HTML with a careful whitespace and comment stripper. See the size before and after.Developerjson geojson plainJSON minifierMinify JSON by removing all whitespace, after checking that it is valid, and see the size before and after.DeveloperjsonJSON to TypeScriptTurn a JSON sample into TypeScript interfaces or types, with nested types, unions and optional keys worked out for you.Developerjson yaml ymlJSON to YAMLConvert JSON to clean, readable YAML as you type, with 2 or 4 space indents and long strings kept on one line.Developerjson yaml ymlJSON, YAML, TOML and XML converterConvert between JSON, YAML, TOML and XML in any direction as you type, with clear line and column errors.