Free JSON Formatter and Validator
Paste JSON to format it, minify it or sort its keys. If it is broken, see the line and column of the error and the likely cause, like a trailing comma or single quotes.
- Format, minify and sort keys
- Errors with line and cause
- Free, nothing leaves your browser
Formatted in your browser; nothing is sent to us.
Result
Valid JSON: 6 keys, 2 levels deep, 154 B.
{
"name": "Roof repair",
"price": {
"from": 350,
"currency": "USD"
},
"areas": [
"Austin",
"Round Rock"
],
"emergency": true
}Want a fast site built on clean code? See our web design
JSON Rules That Trip People Up
JSON looks like JavaScript but is stricter. These are the mistakes behind most errors.
- Double quotes only
- Keys and strings need double quotes: {"name": "Ann"}. Single quotes are an error.
- Quoted keys
- Every key is a string in quotes. {name: 1} is valid JavaScript but not JSON.
- No trailing commas
- A comma after the last item in an object or array is an error.
- No comments
- JSON has no comments. Remove // and /* */ notes, or keep them in a separate file.
- Allowed values
- Strings, numbers, true, false, null, objects and arrays. undefined, NaN, Infinity and dates as objects are not JSON. RFC 8259: The JSON data format
How to Format and Fix JSON
Paste, read, fix, copy.
Paste your JSON
From an API response, a config file or a log. It is read in your browser.
Read the result
Valid JSON is formatted at once, with its size, number of keys and depth.
Fix any error
Go to the line and column shown. The hint names the usual cause: a trailing comma, single quotes, an unquoted key or a comment.
Copy or download
Choose formatted for reading or minified for sending, then copy it or save formatted.json.
When You Want It Done for You
From clean data to a site that ranks.
SEO audit services
Every technical issue on your site, speed included, with the fix and what it costs you.
OpenAI search optimization
Get visible in AI search in under 90 days, or we work free until you get there.
OpenJSON Formatter Questions
Is my JSON sent to a server?
How do I find an error in JSON?
What is the difference between formatting and minifying?
Does sorting keys change the data?
Can it handle large files?
Why does valid JavaScript fail as JSON?
Want a Site That Is Fast, Accessible and Built to Rank?
Tools fix one thing at a time. A free website plan covers the lot: the pages you need, a copy outline, a fixed price and a launch date, live in 14 days.
- The pages you need, and the one job each page does
- What your current site loses, in leads and money
- A fixed price and a 14-day launch date
- An honest answer on whether you need a new site at all
Rather talk it through? Call +1 (217) 677-5905