JSON Validator

Check whether your JSON is valid, flagging any errors so you can fix them before use. No signup. Ideal for making sure JSON is correct before you rely on it.

Remove Ads
Upload File
Remove Ads

Result

Remove Ads
Remove Ads

Share on Social Media:

A JSON validator checks whether your JSON is valid — free, in your browser, with no account. Paste your JSON, click Validate JSON, and the tool tells you straight away: valid, or invalid with the exact line and the error. Validating does not reformat your JSON and does not fix errors for you — it finds them so you can fix them yourself. Your JSON is checked on your own device and never stored.

On this page

  1. How to Validate JSON Step by Step
  2. What Validating JSON Means and Why It Matters
  3. Valid Versus Invalid JSON
  4. Worked Example: A Valid JSON and the Error It Finds
  5. Who Uses a JSON Validator
  6. Pro Tips for Valid JSON
  7. Common JSON Validation Mistakes to Avoid
  8. Related Tools You May Need Next
  9. Frequently Asked Questions

How to Validate JSON Step by Step

  1. Paste your JSON. Paste or type it into the editor above. You can also upload a .json file, or load JSON from a public URL instead.
  2. Click Validate JSON. One click checks the whole document.
  3. Read the result. A green “JSON is valid” means you can use it. A red “JSON is invalid” means there is at least one error to fix.
  4. Read the error message. Each error names the line and what the parser expected there, so you know exactly where to look.
  5. Fix the error and validate again. Correct the flagged problem, click Validate JSON again, and repeat until the result is green.
  6. Copy or save it. When the JSON is valid, use Copy to Clipboard to paste it into your code, or Save as TXT to download it as a text file.

JSON being checked, with a green valid mark and a red error mark

What Validating JSON Means and Why It Matters

JSON must follow strict syntax to work. A missing bracket, a trailing comma, or a single quote where a double quote belongs is enough to make the whole document invalid — and anything that tries to parse it will fail. Validating checks the document against those rules before you rely on it, so you catch the mistake here instead of in your code, your API call, or your config file.

What this tool doesHow
Takes JSON three waysPaste or type it, upload a .json file, or load it from a public URL
Validates the whole documentOne click checks every bracket, comma, quote, and key
Shows a clear resultGreen “JSON is valid” or red “JSON is invalid”
Names the error and its lineEach error message gives the line number and what was expected
Copies the valid JSONCopy to Clipboard button (shown when the JSON is valid)
Saves the valid JSONSave as TXT button, downloads it as json-validator.txt
Keeps your JSON privateChecked in your browser; nothing is stored

What it does not do matters just as much: clicking Validate JSON does not format or beautify your JSON, does not minify it, and does not fix errors automatically. (The editor’s own toolbar has separate Format, Compact, Sort, Filter and Repair buttons for the JSON in the editor.) Validating answers one question — is this JSON correct? — and points at the problem when it is not.

Valid Versus Invalid JSON

AspectValid JSONInvalid JSON
SyntaxFollows the JSON rules exactlyBreaks at least one rule
Can it be parsed?Yes — any parser accepts itNo — parsers reject it
What the tool showsGreen “JSON is valid”Red “JSON is invalid”, plus an error message naming the line
Ready to useYesNo — fix the flagged error first, then validate again

Validating, formatting, and minifying are three different jobs:

TaskDoesUse when
ValidateChecks the JSON is correct, and names the error line when it is notBefore you trust JSON in your code or send it to an API — this is what this page does
Beautify (format)Adds indentation and line breaks so JSON is easy to readReading messy or minified JSON — use the JSON Formatter
MinifyRemoves all whitespace so JSON is as small as possibleSending JSON over a network or storing it where size matters — use the JSON Minifier

A nicely formatted document is not necessarily valid, and a valid document is not necessarily readable. Validate first to confirm correctness, then format separately for readability.

Worked Example: A Valid JSON and the Error It Finds

Paste this JSON and click Validate JSON:

LineJSON
1{
2  "name": "Ada",
3  "age": 36,
4  "city": "Dhaka"
5}

The result is green: JSON is valid. The Copy to Clipboard and Save as TXT buttons appear, so you can take the checked JSON straight into your code.

Now add one character — a comma after the last value:

LineJSON
1{
2  "name": "Ada",
3  "age": 36,
4}

The result is red: JSON is invalid, and the tool reports this exact error:

LineError message
1Parse error on line 3:
2..."Ada", "age": 36,}
3---------------------^
4Expecting 'STRING', got '}'

The message tells you the line (line 3), shows the text around the problem, and says what the parser expected — another string key — instead of the } it found. The editor also highlights the closing-brace line (line 4) in pale yellow, with a red X in the gutter. A trailing comma after the last item in an object or array is one of the most common JSON mistakes, and it is invisible until you validate: the document looks fine, but no parser will accept it. Remove the comma, validate again, and the result turns green.

A laptop showing JSON validation results with green checks and one red error

Who Uses a JSON Validator

Developers. Checking JSON before pasting it into code or sending it to an API.

API testers. Confirming a response is valid JSON before using it in a test.

Students. Learning JSON syntax by seeing exactly which mistake breaks a document.

Data analysts. Checking JSON copied from a log file or database export before working with it.

Webmasters. Checking a config file or structured-data snippet before publishing it.

Anyone debugging. Finding why JSON that looks fine will not load.

A JSON document passing through a validation check, valid marked green and invalid marked red

Pro Tips for Valid JSON

Validate before you trust it. Never paste JSON into code or send it to an API without checking it first — one bad character is enough to break it.

Read the line number, not just the verdict. The error message names the line and what was expected; go straight there instead of re-reading the whole document.

Fix one error, then validate again. Fixing one mistake can reveal another, so revalidate after every fix until the result is green.

Validate after every edit. Editing a working document can introduce a new error — a quick re-check costs seconds and catches it.

Use the Validator to find errors, the Formatter to read JSON. Validate first, fix the errors, then format the valid JSON so it is easy to read.

Copy, don’t retype. Once the JSON is valid, use Copy to Clipboard so it moves into your code exactly as checked, with no typing mistakes.

Keep notes outside the JSON. JSON has no comments — anything that is not JSON data will make the document invalid.

Common JSON Validation Mistakes to Avoid

Leaving a trailing comma. {"a": 1,} is invalid JSON. Remove the comma after the last item in an object or array.

Using single quotes. JSON strings must use double quotes — {'name': 'Ada'} is invalid; {"name": "Ada"} is valid.

Forgetting quotes around keys. {name: "Ada"} is invalid; keys must be quoted: {"name": "Ada"}.

Adding comments. JSON has no comments — // note or /* note */ makes the whole document invalid.

Using NaN or Infinity. These are valid in JavaScript but not in JSON. Use null or a number instead.

Leaving a bracket unclosed. Every { needs a } and every [ needs a ] — the error message names the line where the parser gave up.

Assuming formatted means valid. A tidy-looking document can still be invalid. Validate it; formatting alone proves nothing.

Ignoring the error and using the JSON anyway. If the tool says “JSON is invalid”, the JSON will fail wherever you use it — fix the flagged error first.

Not revalidating after fixing. A fix can introduce a new error, so validate again until the result is green.

Related Tools You May Need Next

For working with JSON, our JSON Formatter formats valid JSON into clean, readable JSON, the JSON Minifier shrinks it to the smallest one-line form, the JSON Beautifier beautifies it for readability, the JSON Viewer displays it as a collapsible tree, the JSON Editor lets you edit it, the JSON Escape tool escapes it for embedding in code, and the JSON to XML, JSON to CSV, and JSON to YAML tools convert it to other formats. You can also convert back with CSV to JSON or XML to JSON.

Frequently Asked Questions

How do I validate JSON?

Paste your JSON into the editor, or upload a .json file, or load it from a public URL, then click Validate JSON. The tool shows a green “JSON is valid” or a red “JSON is invalid” — and if it is invalid, an error message names the line and what was expected, so you can fix it and validate again.

Is this JSON validator free?

Yes. It is completely free with no account and no sign-up, and it runs in your browser.

What does the error message tell me?

It names the line where the parser stopped, shows the text around the problem, and says what it expected to find there — for example, Parse error on line 3: ... Expecting 'STRING', got '}' means a closing brace appeared where another key was expected, which is what a trailing comma causes.

Can this tool fix my JSON?

No — not with the Validate JSON button. It finds the error and tells you the line, but you fix it yourself: usually a missing bracket, a trailing comma, or a single quote. Fix it, then click Validate JSON again to check the corrected version.

Does validating format or beautify my JSON?

No. Clicking Validate JSON only checks whether the JSON is correct — it does not add indentation or change how the JSON looks. (The editor’s own toolbar has separate Format and Compact buttons if you want to reformat the JSON in the editor.) To make valid JSON readable, use the JSON Formatter; to shrink it, use the JSON Minifier.

What files can I upload?

.json files only. Any other file type shows an “Invalid File” message.

Can I load JSON from a URL?

Yes. Paste a public URL into the “Load from URL” field and the tool loads the JSON from that address. The URL must return JSON, and private or local addresses do not work.

Is my JSON private?

Yes. Pasted or uploaded JSON is checked in your browser, and nothing is stored on this site.

Why does it say “JSON is invalid”?

The most common causes are a trailing comma, single quotes instead of double quotes, unquoted keys, a missing or unclosed bracket, or a comment inside the JSON. Read the error message — it names the line — fix the flagged problem, and validate again.

Can I download the checked JSON?

Yes, when it is valid. Click Save as TXT to download it as a text file, or use Copy to Clipboard to paste it straight into your code. Both buttons only appear when the JSON is valid.