JSON Validator

Validate JSON online and find the exact line of any syntax error — free JSON checker.

About

About the JSON Validator

Checks whether a block of JSON parses correctly, and shows structure details or the exact error position if it doesn't.

API developers use it to sanity-check a response body before writing code against it, while support and QA teams use it to quickly confirm whether a customer-submitted JSON payload is even valid before digging further. It's one of many free data tools on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.

Choose what to view about this tool

Guide

Using the JSON Validator

  1. 1

    Step 1

    Paste the JSON you want to check into the text box.

  2. 2

    Step 2

    Click "Validate".

  3. 3

    Step 3

    If it's valid, read the structure details — root type, size, nesting depth, characters and lines.

  4. 4

    Step 4

    If it's invalid, read the error message for the exact line and column, then fix and re-check.

  • Validates JSON using the browser's strict, spec-compliant JSON parser
  • Reports the exact line and column of a syntax error, plus a snippet of text around it
  • Shows the root value's type (object, array, string, number, boolean or null)
  • Shows the root's size — item count for arrays, key count for objects
  • Reports nesting depth, and total character and line counts of the input
  • Works entirely in your browser — nothing you paste is sent to a server
  • Free to use, with no sign-up and no limit on how many times you run it

API developers

API developers use the JSON Validator for confirming a response body is well-formed JSON before writing parsing code against it.

QA engineers

QA engineers use the JSON Validator for quickly checking whether a test fixture or captured payload is valid before investigating further.

Support teams

Support teams use the JSON Validator for checking a JSON snippet a customer pasted into a ticket, to rule out a simple syntax mistake.

Students learning JSON

Students learning JSON use the JSON Validator for seeing exactly which character broke their document while learning the format's rules.

Examples

JSON Validator examples

4 worked examples

01

Valid flat object

Validate {"name":"Ada","age":30} to see it marked Valid JSON, reported as an Object with 2 keys at depth 1.

02

Valid nested array

Validate {"users":[{"id":1},{"id":2}]} to see it marked Valid JSON, reported as an Object with 1 key at depth 3.

03

Trailing comma caught

Validate {"a":1,} and it's marked Invalid JSON, since trailing commas aren't allowed in strict JSON.

04

Syntax error location

Validate {"a": 1 "b": 2} (missing comma) and it's marked Invalid JSON, with the message pointing to the exact line and column where parsing broke.

FAQ

Frequently asked questions

Quick answers to common questions about the JSON Validator.

What does the JSON Validator do?

It checks whether JSON parses correctly, and shows either structure details (for valid JSON) or the exact error position (for invalid JSON).

Is the JSON Validator free to use?

Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.

Is my JSON safe when I use this tool?

Yes. Validation runs entirely in your own browser using JavaScript's built-in JSON parser — nothing you paste is sent to a server.

How does it find the error position?

It reads the position the browser's JSON parser reports for the failure and converts it into a line and column number, along with the surrounding text, so you can find the exact spot faster.

What does "nesting depth" mean?

It's how many levels of objects and arrays are nested inside each other, counted from the outermost value. A flat object with no nested objects or arrays has a depth of 1.

Does this tool fix invalid JSON for me?

No. It only tells you that the JSON is invalid and where the problem is — you make the fix and validate again.

Can I use the JSON Validator on my phone?

Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.

Does the JSON Validator have any limitations?

It follows the strict JSON spec, so JavaScript-only syntax like trailing commas, comments or unquoted keys will be reported as invalid, even though some JavaScript engines tolerate them.

Still have a question? Contact us

Report a problem

JSON Validator

What went wrong?
    or paste a screenshot