JSON Validator
Paste or upload JSON to instantly validate it, find syntax errors with line and column information, and format or minify the result. Everything runs in your browser — your data never leaves your device.
Read the guide: How to validate JSONInput
Result
Your JSON is processed only to provide the requested validation and formatting functionality. We do not include your JSON content in analytics.
How the JSON Validator works
- Your text is parsed using the browser's built-in JSON parser in a background worker.
- If parsing succeeds, the tool reports the root type and lightweight statistics.
- If parsing fails, the error position is converted to a line and column so you can find the problem fast.
- Format and Minify re-serialise the parsed value with your chosen indentation or no whitespace.
See also: JSON Formatter and JSON to CSV Converter.
Examples
Simple object
{
"name": "John",
"age": 30,
"active": true
}Array of objects
[
{"id": 1, "name": "Ada"},
{"id": 2, "name": "Alan"}
]Useful tips
- Use Validate first on broken JSON to find the error before formatting.
- Choose 2 spaces, 4 spaces or tabs for formatting — the data stays the same.
- Upload a .json file to validate it instantly without pasting.
Frequently asked questions
What is a JSON Validator?+
A JSON Validator checks whether your text conforms to JSON syntax rules and can be successfully parsed. It reports any syntax errors with the line and column where the problem was found.
How do I validate JSON?+
Paste your JSON into the editor and click Validate JSON. The tool parses it instantly and reports whether it is valid, or shows the error location if it is not.
Why is my JSON invalid?+
The most common causes are unquoted property names, single quotes instead of double quotes, trailing commas, missing commas between values, and unclosed brackets or braces.
Does JSON allow single quotes?+
No. JSON requires double quotes for all strings and property names. Single quotes are valid in JavaScript but not in JSON.
Does JSON allow trailing commas?+
No. Standard JSON does not allow a comma after the last value in an object or array. Remove any trailing commas.
How do I format JSON?+
Paste valid JSON and click Format JSON. The tool pretty-prints it with consistent indentation. You can choose 2 spaces, 4 spaces, or tabs.
How do I minify JSON?+
Paste valid JSON and click Minify JSON. The tool removes all unnecessary whitespace while preserving the data exactly, producing the smallest valid JSON.
What is the difference between JSON and JavaScript?+
JSON is a data format based on JavaScript syntax but stricter. JSON requires double-quoted keys, does not allow trailing commas, comments, or single-quoted strings, and does not support expressions or functions.
Can I validate a JSON file?+
Yes. Click Upload JSON File and choose a .json file. The file is loaded as text and validated immediately.
Is my JSON stored when I validate it?+
No. Your JSON is processed entirely in your browser and is never uploaded or stored. We do not include your JSON content in analytics.
Related guides
How to format and validate JSON
JSON is the lingua franca of the modern web, but a single stray comma can break an entire API response. This guide shows you how to format and validate JSON quickly, what the most common errors look like, and how to fix them — all using a free tool that runs entirely in your browser.
How to convert JSON to CSV
JSON is great for APIs, but spreadsheets still rule for analysis. This guide explains how to turn JSON into a clean CSV file, how nested values are handled, and the common pitfalls to avoid — all using a free tool that runs entirely in your browser.
How to minify JSON
Minified JSON is smaller, faster to transfer and just as valid as the formatted original. This guide explains what minification does, how it differs from compression, and why your data stays exactly the same — all using a free tool that runs entirely in your browser.
How to format XML
Compact XML is hard to read and debug. This guide explains what XML formatting is, why it matters, and how to pretty-print XML safely — all using a free tool that runs entirely in your browser.