How to validate JSON
- Paste your JSON into the input box above.
- Click Validate. Valid JSON shows a green tick; invalid JSON shows the error with its line and column.
- Fix the error, validate again, then click Beautify or Minify.
The most common JSON errors
- Trailing comma:
{"a": 1,}. Remove the comma after the last item. - Single quotes:
{'a': 'b'}. JSON requires double quotes. - Unquoted keys:
{a: 1}must be{"a": 1}. - Comments:
//and/* */are not allowed in standard JSON. - Missing brackets: every
{and[needs a closing partner. - Invalid values:
undefined,NaNand functions are not valid. Usenull.
Who uses a JSON validator?
Developers testing API responses, marketers editing tracking configs and schema markup, and anyone working with settings files for apps, plugins or automation tools. Invalid JSON often breaks a whole feature silently, so checking it first saves time.
Private by design
Validation runs in your browser, so API keys, tokens and customer data in your JSON never leave your device. Need to encode data? Try the Base64 encoder or URL encoder.
Examples of JSON errors and how to fix them
| Wrong | Right | Why |
|---|---|---|
{name: "Ali"} | {"name": "Ali"} | Keys need double quotes |
{'city': 'Lahore'} | {"city": "Lahore"} | Single quotes are not allowed |
[1, 2, 3,] | [1, 2, 3] | No comma after the last item |
{"ok": True} | {"ok": true} | true, false and null are lowercase |
The validator shows the line and column of the first error, so you can jump straight to it. Once it is valid, tidy it up with the JSON formatter.
JSON validator or JSON formatter?
A validator answers one question: is this valid JSON, and if not, where is the first error? A formatter takes valid JSON and makes it readable with indents and line breaks, or squeezes it onto one line. Validate first, then format with the JSON formatter.
Checking schema markup (JSON-LD)
SEO schema markup, such as FAQ or product schema, is written in JSON-LD. One missing comma or quote stops Google from reading all of it. Paste the code between the <script type="application/ld+json"> tags here to check the syntax, then test the page in Google’s Rich Results Test.
Frequently asked questions
How do I know if my JSON is valid?
Paste it and click Validate. You will see either a success message or the first error with its line and column.
Can JSON contain comments?
Standard JSON does not allow comments. Some tools accept JSONC or JSON5, but most APIs do not.
Is my JSON uploaded?
No. Validation happens in your browser.
Why does my JSON say unexpected token?
Usually because of a missing or extra comma, single quotes or a key without double quotes. The error message shows the line and column where it happens.
Does it check my JSON against a JSON Schema?
No. It checks that the JSON syntax is valid, such as quotes, commas and brackets. It does not check your data against a separate JSON Schema file.
Is there a size limit?
There is no fixed limit. Validation runs in your browser, so very large files depend on your device memory, but normal API responses and config files are no problem.

