Home / Tools / Data and formats
JSON Formatter & Validator
Format, validate, minify, stringify and parse JSON.
Runs in your browserFree, no sign-upOpens .json, .txt
Loading tool…
How to use it
- Paste JSON into the input, or click Open file to load a .json file.
- Pick Format, Minify, Stringify or Parse.
- Copy the result or download it as a file.
About this tool
Paste JSON or open a .json file to pretty-print it with 2 or 4 spaces, minify it for transport, or check that it is valid. Errors show the line and column so you can find a missing comma quickly. Stringify turns any text into an escaped JSON string, and Parse does the reverse, which is handy for payloads that were stringified twice.
Your input is processed on your device. Nothing is sent to a server or stored.
Questions
Is my JSON sent to a server?
No. Everything runs in your browser, so private API responses never leave your machine.
Why does it say Unexpected token?
JSON needs double quotes around keys and strings and no trailing commas. The error message shows the line and column of the first problem.
Data and formats
All data and formatsMore tools like this
Data and formatsXML to JSON ConverterConvert XML to JSON and JSON back to XML.Opens filesOpen →Data and formatsCSV to JSON ConverterTurn CSV or TSV into JSON and JSON arrays into CSV.Opens filesOpen →Data and formatsYAML to JSON ConverterConvert YAML to JSON and JSON to YAML.Opens filesOpen →Data and formatsJSON to TypeScriptGenerate TypeScript interfaces from a JSON sample.Opens filesOpen →Data and formatsSQL FormatterFormat messy SQL into readable, indented queries.Opens filesOpen →Data and formatsHTML Beautifier & MinifierIndent minified HTML or minify it for production.Opens filesOpen →Data and formatsMarkdown Table GeneratorTurn CSV or spreadsheet cells into a Markdown table.Opens filesOpen →Data and formatsQuery String to JSONTurn URL parameters into JSON and JSON into a query string.Open →