{ } JSON Validator
Format JSON About
1
Decode JWT

Left

Right


      
Keyboard Shortcuts
Ctrl+Shift+FFormat / Beautify JSON
Ctrl+Shift+MMinify JSON
Ctrl+Shift+SSort Keys
Ctrl+ZUndo
Ctrl+Y / Ctrl+Shift+ZRedo
Ctrl+FSearch (Tree Viewer)
?Open this shortcuts list
JWT Decoder
Load JSON from URL

The URL must support CORS or be a public API endpoint.

Filter Fields

Uncheck fields to hide them from the tree view. Arrays appear once.

Drop JSON file here

JSON Validator: Check JSON Syntax Online

Paste your JSON and it is checked instantly. If something is wrong, you see what and where. Nothing is uploaded: validation runs in your browser.

How to validate JSON

  1. Paste your JSON into the editor, drop a .json file on the page, or load it from a URL.
  2. The status bar updates as you type. Valid JSON is confirmed, and invalid JSON shows an error message.
  3. When the parser reports a position, the message includes the line and column so you can go straight to it.
  4. Fix the problem, or click Repair JSON to try an automatic fix.

What the validator checks

Validation uses your browser's built-in JSON parser, so it accepts exactly what JSON.parse accepts: strict JSON syntax. Strings and keys must use double quotes, values must be an object, array, string, number, true, false, or null, and there can be no comments or trailing commas. This is a syntax check. It does not validate your data against a JSON Schema.

Common JSON errors and what they mean

  • Unexpected token: a character that JSON does not allow at that position, such as a single quote, a trailing comma, or a comment.
  • Unexpected end of JSON input: the text stops early, usually because a closing } or ] is missing.
  • Expected property name: an object key is unquoted, or there is a comma after the last property.
  • Unterminated string: a string was opened but never closed, often from a raw line break or an unescaped quote inside it.
  • Bad control character: a tab or newline inside a string that should be written as \t or \n.

Exact wording varies by browser, because each engine writes its own messages. For causes and fixes with examples, read Common JSON Errors and How to Fix Them.

Repair invalid JSON

The Repair JSON button removes comments and trailing commas, quotes bare keys, converts single quotes, and replaces True, False, None, undefined, NaN, and Infinity. It cannot recover missing brackets or lost data, and it leaves your text unchanged if the result still is not valid. Once your JSON is valid, Format re-indents it and the tree viewer lets you inspect it.

More JSON tools

  • Format JSON: formatter, validator, tree viewer and diff.
  • JSON Prettier: pretty print JSON and repair invalid JSON.
  • JSON Diff: compare two JSON documents.
  • JSON to CSV: convert JSON to CSV (and CSV back to JSON).
  • JSON to YAML: convert JSON to YAML.
  • JSON Minifier: minify JSON and remove whitespace.
  • JWT Decoder: decode and inspect JSON Web Tokens.
  • Common JSON Errors: causes and fixes for invalid JSON.

Frequently asked questions

How do I validate JSON?

Paste it into the editor. It is validated as you type, and errors appear with a message and, when available, the line and column.

Does it validate against a JSON Schema?

No. It checks JSON syntax only, using the same rules as JSON.parse in your browser.

Why does my JSON with comments fail?

Standard JSON does not allow comments. Remove them, or use Repair JSON to strip them automatically.

Is my JSON sent to a server?

No. Everything happens in your browser, so your data never leaves your device.

Is there a size limit?

There is no server-side limit because nothing is uploaded. Very large documents are limited only by your browser and device memory.

© 2026 Format JSON · v1.2.0 · Free & open source · 100% client-side · JSON Prettier · Changelog · JWT Decoder · Privacy Policy · Terms of Service