JSON

JSON Validator

Check JSON syntax instantly — precise error location plus a quick structural summary of your document.

Your JSON is parsed locally in your browser. Nothing is uploaded, logged, or stored.

1
Paste your JSON here, e.g. {"key": "value"}

How to use

  1. Paste your JSON into the editor.
  2. Click Validate JSON.
  3. If it is valid you get a summary (top-level type, key count, depth). If not, the error is shown with line and column.

What valid JSON means

JSON has a strict, minimal grammar: strings must use double quotes, keys must be strings, trailing commas are forbidden, and the only literals are true, false, and null. Most broken payloads fail on one of these rules — a single quote here, a trailing comma there, an unquoted key copied from JavaScript.

This validator parses your input with a strict JSON parser and, on failure, converts the reported character position into line and column numbers so you can jump straight to the problem. On success it walks the parsed value and summarizes it: the top-level type, the total number of object keys, and the maximum nesting depth — a handy sanity check before you wire the data into an API or test.

Need more than a check? The JSON Formatter & Validator also pretty-prints and minifies, the JSON Diff compares two documents, and the XML Validator does the same job for XML.

Examples

API payload checks

Paste a request body before sending it — catch trailing commas and unquoted keys before they become a 400 response.

Config file sanity

Validate package metadata, environment exports, or any JSON config after a manual edit.

Quick structure overview

The valid-summary shows the top-level type, key count, and depth, so you can gauge an unfamiliar document at a glance.

Frequently Asked Questions

Is my JSON uploaded anywhere?+
No. Parsing happens entirely in your browser using the built-in JSON.parse API. Nothing leaves your device.
Does it accept JavaScript object literals?+
No — JSON is stricter than JavaScript. Unquoted keys, single quotes, trailing commas, and undefined are all rejected, exactly as a real JSON parser would.
Are comments allowed?+
No. Standard JSON has no comment syntax. Remove // and /* */ comments before validating, or use JSONC-compatible tooling in your editor.
What does the line and column point to?+
The character position reported by the parser is converted to a line and column in your input, which is usually the offending token or just after it.
What is the size limit?+
There is no hard limit — it depends on your device's memory. Typical API payloads and config files validate instantly.
What should I do after validation?+
Pretty-print the document with the JSON Formatter or convert it to XML with the JSON to XML Converter.

Related Tools

Looking for something else? Browse all tools