Free · no account · nothing uploaded

JSON validator, formatter and structure viewer

Paste JSON to validate and pretty-print it, browse its shape, and when it is broken, get the precise line and column where the grammar first went wrong.

Workspace/json
RUNS LOCALLY

JSON validator

Say it the way you would say it to a person. Your words are matched to one of 18 tools by readable rules, and the tool runs right here in your browser. No upload, no account.

/ tools⌘K search↑ last message

JSON validatorRuns on this device · nothing uploaded

This tool runs in your browser and needs JavaScript turned on.

How to use the JSON validator

  1. Paste your JSON into the message box, or drop a .json file into “Your files”.
  2. Ask “is it valid json?”, “format this json with 4 spaces”, “minify it” or “sort the keys”.
  3. If it is broken, read the line and column where the grammar first fails, and fix it there.
  4. If it is valid, browse its structure, then download the formatted file.

Things you can type: is it valid json? format this json

The error message is the whole product

Anyone can pretty-print valid JSON. The moment that matters is the one where a 4,000-line configuration file will not parse and you need to know where.

Browsers are unhelpful here. Current V8 gives no character offset at all — only a short window of surrounding text — and reverse-engineering a line number from that window is guesswork. A version of this tool that did exactly that reported line 5 for an error on line 4.

Faults are located by walking the grammar

Instead of scraping the engine’s message, this tool runs a small scanner over the input and reports the offset where the grammar first fails, converted to a line and column.

The result is exact, and identical in every browser — a claim the error-message approach cannot make from one release to the next.

And when it is valid

You get formatted output, plus a structure view: the keys, the nesting, the types and the array lengths. That is usually the fastest way to answer the actual question, which is rarely "is this valid" and almost always "what shape is this and where is the field I need".

The four faults that account for most of them

When a file will not parse, it is almost always one of these:

  • A trailing comma after the last element of an array or object — legal in JavaScript, and never in JSON.
  • Single quotes around a string or a bare key. JSON requires double quotes on both.
  • A comment. JSON has none, however reasonable that seems in a configuration file.
  • An unescaped control character, usually a raw newline inside a string, pasted from somewhere else.

Paste credentials with less anxiety

API responses, service-account keys and deployment configuration are the JSON people most often need to check, and they are exactly the JSON that should not be pasted into an unknown website.

This page has no backend. The text you paste is read by the tab and nothing else, which is a property you can confirm by disconnecting from the network and watching the tool keep working.

Questions

JSON validator: common questions

Does it send my JSON anywhere?

No. Validation, formatting and the structure view all happen in your browser tab. This matters more for JSON than for most formats, because configuration files and API responses routinely contain credentials.

Can it handle JSON with comments or trailing commas?

It validates strict JSON, so both are reported as faults — with the position, which is what you need in order to remove them.

How big a file can it check?

Large ones. The scanner is a single pass over the text, so multi-megabyte files are checked in well under a second.