JSON Formatter and Validator
Guide & FAQEverything is processed by scripts running in your browser tab.
Guide: JSON Formatter and Validator
Format, minify and validate
Paste your JSON into the input box and press Format to pretty-print it with 2 spaces, 4 spaces or tabs. Minify removes all extra whitespace for the smallest size. Validate only checks it and tells you what is inside.
Fixing errors
The error message names the problem and the exact line and column, and the position is highlighted in the input. The most common mistakes are:
- A trailing comma after the last item.
- Single quotes instead of double quotes.
- Keys without quotes.
- Comments, which JSON does not allow.
- A missing closing bracket or brace.
Tree view
Switch the output to Tree to explore large documents. Objects and arrays collapse and expand, and long branches are only built when you open them, so big files stay responsive.
Convert between formats
Turn an array of objects into CSV for a spreadsheet, load a CSV file into JSON, or switch between JSON and YAML for configuration files. Download the result or copy it with one click.
Privacy
Everything runs in your browser. Your data is not sent to a server by this tool.
FAQ
How do I find the error in my JSON?
Paste it and press Validate or Format. If the JSON is invalid, the tool reports the problem with the line and column and selects that spot in the input box. Common causes are a trailing comma, single quotes, an unquoted key or a missing bracket.
Is my JSON uploaded anywhere?
No. Formatting, validation and conversion are done by scripts running in your browser tab. The tool does not make network requests with your data.
How does JSON to CSV work?
An array of objects becomes a table: the keys become the header row and every object becomes one row. Nested objects and arrays are written as JSON text inside the cell. Quotes and commas inside values are escaped.
Does CSV to JSON guess data types?
Yes, basic types. Plain numbers, true, false and null are converted; everything else stays a string. The first row is used as the keys, and semicolon-separated files are detected.
What does sort keys do?
It rewrites the JSON with the keys of every object in alphabetical order, at every depth. Array order is never changed. It is handy for comparing two JSON documents.
Open-source licences
- js-yaml 5.5.0 (YAML conversion): MIT