JSON Validator & Formatter
Paste JSON to check it instantly. Errors show the exact line and column, and valid JSON is pretty-printed or minified for you — all in your browser.
Runs in your browser — your code is never uploaded. Tip: drop a file on the input box, or press Ctrl + Enter.
How to Validate and Format JSON
Check any JSON from an API, config file or log in seconds.
Paste or Upload JSON
Paste your JSON, upload a .json file, or drag and drop it into the box.
See the Result
Valid JSON is formatted instantly. If there is a mistake, you see the line, column and the text near the error.
Fix, Copy or Download
Fix the error, then copy the clean JSON or download it. Switch to Minify for one-line JSON.
Errors
Exact line & column
Format
2, 4 spaces or tabs
Minify
One-line JSON
Privacy
Runs in your browser
Works on
Phone & computer
Price
100% free
Common JSON Errors and How to Fix Them
Most invalid JSON comes from one of these mistakes.
| Mistake | Wrong | Right |
|---|---|---|
| Single quotes | {'name': 'Asha'} | {"name": "Asha"} |
| Trailing comma | [1, 2, 3,] | [1, 2, 3] |
| Keys without quotes | {name: "Asha"} | {"name": "Asha"} |
| Missing comma | {"a": 1 "b": 2} | {"a": 1, "b": 2} |
| Comments | {"a": 1 // note} | {"a": 1} (JSON has no comments) |
| Special values | undefined, NaN | null or a number |
What Can You Use It For?
Popular ways people use JSON Validator.
API Responses
Check and read JSON returned by REST APIs and webhooks.
Config Files
Validate package.json, composer.json, tsconfig and app settings.
Debugging
Find the exact character that breaks your JSON.parse().
Minify for Production
Remove spaces to make JSON payloads smaller.
Tips for the Best Result
- JSON needs double quotes around keys and text — single quotes are the most common error.
- The error message shows the line and column. Look just before that point for a missing comma or bracket.
- Use Sort keys A→Z to compare two JSON files more easily, then check them in Code Compare.
- Need the data in Excel? Convert it with JSON to CSV.
Frequently Asked Questions
Quick answers about JSON Validator.
Paste it in the box. If it is valid you see a green "Valid JSON" message and the formatted result. If not, the exact line and column of the error are shown.
A validator checks that the JSON follows the rules. A formatter (or beautifier) adds line breaks and indentation so it is easy to read. This tool does both.
Choose Minify (one line) under Output. All spaces and line breaks are removed.
Common reasons are single quotes, a trailing comma, keys without quotes, comments or a hidden character copied from a web page.
Yes. Files of several megabytes work, because everything runs on your own device.
Yes. Tick Sort keys A→Z — nested objects are sorted too, arrays keep their order.
No. Everything runs in your web browser, so your code and data never leave your device.
Yes — 100% free, with no sign-up and no limits.
Related Free Tools
Ready to Use JSON Validator?
Scroll up and get your result in seconds. 100% free, no sign-up needed.
Start Now