JSON Validator

Find out whether JSON parses, and where it stops.

FREE - NO SIGN-UP - RUNS ON YOUR DEVICE

Checked in your own tab

  • Line + colon failure
  • Syntaxnot schema
  • 0uploads
  • Freeno account
Specification

JSON Validator at a glance

Input
Pasted JSON
What is checked
Whether the text parses
On failure
The line and column are named
On success
Formatted output when it parses
What it does not check
Not schemas or required fields
Price
Free
Account needed
None
Where processing happens
On your device
How to

How to use JSON Validator

  1. 1

    Paste what you want checked

    Paste the JSON to check.

  2. 2

    Read the verdict

    See whether it parses.

  3. 3

    Fix and check again

    Fix that character and check again.

Questions

Frequently asked questions

It says invalid but it looks fine.

Look at the reported position. A trailing comma before a closing bracket, a single quote instead of a double, or a smart quote pasted from a document are the usual causes.

Can it check my JSON against a schema?

No. It checks syntax only. Whether a required field is present, or a value is the right type, is a separate question this parser does not answer.

Does it accept comments in JSON?

No, and neither does JSON. Comments are a common extension in config files, and the parser here stops at the first one it meets.

Is the JSON sent anywhere to be checked?

No. The parser is the one built into your browser and it runs in this tab. Nothing is uploaded, logged or stored.

Background

What usually breaks JSON

The browser's own parser reads what you paste. If it parses, the formatted result appears; if it does not, you get the position where the parse ended.

  • A trailing comma after the last item is valid in JavaScript and not in JSON, and it is the most common failure.
  • Single quotes are not JSON. Keys and string values both need double quotes.
  • Quotes and dashes rewritten by a word processor look right and do not parse.
  • A file that starts with a byte order mark can fail at line one, column one, before any data is read.

Full specification

Specification of the JSON Validator tool
InputJSON pasted into the box.
What is checkedWhether the text parses as JSON: brackets, commas, quoting, escapes and number forms.
On failureThe line and column where the parser stopped, which is the character to look at first.
On successThe parsed data comes back formatted, so you can read what the parser saw.
What it does not checkSchemas. Required fields, value types and allowed ranges are outside what a parser knows.
PriceFree. Supported by clearly labelled ads outside the working area.
Account neededNo.
Where processing happensIn your browser tab. Your input is never uploaded.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS