← Back to the JSON tool

JSON Validator

Last updated: 26 September 2026

Paste any text and find out in a split second whether it is valid JSON — and if it is not, which line and column break the parser and what usually causes it. Nothing leaves your browser.

Local parsing No upload Strict JSON Error line & column

How to use this validator

  1. Copy the JSON you want to check — an API response, a config file, a fixture, a request body.
  2. Paste it into the box above and press Validate JSON, or hit Ctrl/Cmd + Enter.
  3. If it fails, read the reported line and column, then check the cause listed underneath. Most failures are one of the eleven mistakes in the next section.
  4. Once it is valid, open the formatter to pretty-print it, or the minifier to shrink it.

What makes JSON invalid

JSON is a small, strict grammar. Almost every rejection comes down to one of these:

Reading the error message

Browsers word parser errors differently, which is why the same file can produce three different messages, and some of those forms name no place at all. Newer Chrome and Safari report both an offset and a pair — at position 142 (line 5 column 12); older builds report only at position 142, an offset counted in characters; Firefox reports at line 5 column 12 directly. For a handful of errors, such as a trailing comma inside an array, Chrome quotes the surrounding text instead and gives neither number. This page converts all of those into a line, a column and a quoted snippet, and falls back to scanning your text for the mistakes listed above when the engine names no location, so you are not left counting characters by hand.

One trap worth knowing: the reported position is where parsing stopped, which is often a character or two after the actual mistake. A trailing comma is reported at the closing bracket, and a missing comma is reported at the token that follows it. Look slightly left of the caret.

Validate JSON from the command line

For files you cannot paste into a browser — CI checks, gigabyte exports — parse them locally instead. Each of these exits non-zero on invalid input, which makes them usable as a build step:

For a quick check of an HTTP response without saving it, pipe the request into one of them: curl -s https://api.example.com/status | jq empty.

What this validator does not do

It checks syntax, not meaning. It will not run JSON Schema checks, will not tell you a required field is missing, will not compare two documents, and will not repair broken input for you — a tool that silently “fixed” your JSON would only hide the mistake until it reached production. If you want the document restructured instead, that is the formatter's job.

Frequently Asked Questions

How do I know if my JSON is valid?

Paste it into the validator above. It uses your browser's own JSON parser, the same one your application uses at runtime, so a green result means the string will parse in real code and a red one points at the exact line and column where parsing stops.

Why does the validator reject a file my editor accepts?

Most editors relax the rules: they allow comments, trailing commas, single-quoted strings, unquoted keys or JSON5 syntax. Strict JSON permits none of those. The validator follows the strict grammar, because that is what JSON.parse enforces in production.

Is it safe to paste sensitive JSON here?

Yes. Validation happens locally with JSON.parse in your own browser tab. The text is never sent to a server, stored or logged, and after the page loads you can disconnect from the network and keep working.

Does this validator check JSON Schema?

No. It checks syntax only — whether the document is well-formed JSON. It does not verify that required fields exist or that values have the expected types, which is what JSON Schema is for.

What is the difference between validating and formatting JSON?

Validation answers one question: is this syntactically legal JSON? Formatting takes valid JSON and rewrites it with indentation and line breaks so people can read it. Start with the validator when something is broken, then use the formatter to inspect the structure.

Can I validate very large JSON files?

You can, within reason. Everything runs in your browser tab, so a multi-megabyte document is limited by available memory and can make the tab slow to respond. For very large files, split the input or validate a representative section.

Error location looks wrong for your case, or want a check added? Send the offending snippet — a short input plus your browser name is enough to reproduce almost anything.