JSON validator & syntax checker

JSON Validator Online – Validate JSON and Find Syntax Errors

Paste your JSON and find out right away whether it’s valid. If it isn’t, Captain JSON shows the exact error location with the line and column number and a clear error message — so you can fix it fast, even in large files.

  • 100% offline
  • Privacy first
  • Line & column errors

Part of the Captain JSON toolkit — 20+ JSON tools in one extension.

Example: a trailing comma makes this JSON invalid

Illustrative example
Invalid JSON
{  "service": "billing",  "retries": 3,  "endpoints": ["/v1/invoices", "/v1/payments",],  "debug": false}
Why it’s invalid: Line 4 has a trailing comma before the closing bracket, which JSON doesn’t allow.
Cross Browser Support

Available Across All Major Browsers

Your JSON toolkit. Wherever you develop.

Captain JSON is designed to fit into your everyday development workflow. Access your JSON productivity toolkit through your preferred browser and make JSON formatting, comparison, and validation easier.

Available today: Google Chrome, Microsoft Edge and Mozilla Firefox. More browsers are coming soon.

What does a JSON validator do?

A JSON validator checks that text follows JSON syntax: quoted keys and strings, commas in the right places, and matching braces and brackets. Captain JSON’s JSON Validator detects malformed JSON and shows the exact error location, highlighting the line and column number with a clear error message. It checks syntax only — validating against a JSON Schema is a separate step, handled by Captain JSON’s JSON Schema Validator.

About Captain JSON: Captain JSON is a browser extension by PiratesOfBugs that provides JSON developer utilities including JSON comparison, formatting, pretty printing and validation.

Features

JSON validator features

Find out whether your JSON is valid — and exactly where it isn’t.

  • Validate JSON syntax

    Check that your text is well-formed JSON.

  • Detect malformed JSON

    Catch trailing commas, bad quotes, missing brackets and other syntax mistakes.

  • Show exact error location

    Jump straight to where the problem is instead of scanning the file.

  • Highlight line and column number

    The line and column of the error are highlighted for you.

  • Fast validation

    Get a result quickly, even on big documents.

  • Clear error messages

    Understand what went wrong from a clear error message.

  • Support large JSON files

    Validate large files — Captain JSON has been tested with files over 30MB.

Problem & solution

Why JSON errors are hard to spot

The problem

A single missing comma, an extra trailing comma or a stray quote makes a JSON document unparseable — and parsers often report little more than “Unexpected token”. Hunting for the culprit by eye in a long config or API payload is slow and error-prone.

How Captain JSON helps

Captain JSON validates your JSON quickly and points to the line and column of the error with a clear message, so you can jump straight to the fix instead of scanning the whole file.

  • Exact error location
  • Line and column highlighted
  • Handles large JSON files
Use cases

What teams use the JSON validator for

Catch syntax errors where they’re cheapest to fix — before they reach a request, a test run or a deployment.

  • API request validation

    Check that a request body is well-formed JSON before you send it, so a syntax slip doesn’t show up as a confusing 400 error.

  • Configuration files

    Validate app, build and infrastructure config stored as JSON before it reaches an environment.

  • JSON debugging

    When parsing fails with “Unexpected token”, validate the input to find the exact line and column.

  • Automation testing

    Validate test fixtures and expected-response files so a malformed JSON file doesn’t fail a test run for the wrong reason.

  • Before deploying configuration changes

    Make a final syntax check on edited JSON configuration so a missing comma doesn’t take a deployment down.

How to use

How to validate JSON with Captain JSON

Four quick steps from install to a clear answer.

  1. Step 1

    Install and open Captain JSON

    Add the extension from the Chrome Web Store or Firefox Add-ons and open it from your browser toolbar.

  2. Step 2

    Open the Validator

    Choose Validator in the Captain JSON workspace.

  3. Step 3

    Paste or upload your JSON

    Drop in the JSON you want to check — an API response, a config file, a log line.

  4. Step 4

    Read the result

    If the JSON is valid you’re done. If not, use the highlighted line and column and the error message to find and fix the problem.

Examples

Common JSON syntax errors

Most invalid JSON comes down to a handful of mistakes. These illustrative examples show what each one looks like and how to fix it. They are examples, not screenshots of the extension.

Trailing comma

Illustrative example

A comma after the last item in an object or array. Fine in many programming languages, invalid in JSON.

Invalid
{  "name": "Ada",  "active": true,}
Valid
{  "name": "Ada",  "active": true}

Single quotes

Illustrative example

JSON strings and keys must use double quotes.

Invalid
{  'name': 'Ada'}
Valid
{  "name": "Ada"}

Unquoted key

Illustrative example

Object keys must be quoted strings, unlike in JavaScript object literals.

Invalid
{  name: "Ada"}
Valid
{  "name": "Ada"}

Missing comma

Illustrative example

Items in an object or array must be separated by commas. Here the comma is missing at the end of line 2.

Invalid
{  "name": "Ada"  "active": true}
Valid
{  "name": "Ada",  "active": true}
FAQ

JSON validator: frequently asked questions

How do I validate JSON online?

Open Captain JSON, choose the Validator, and paste or upload your JSON. It tells you whether the JSON is valid and, if it isn’t, shows the error with its line and column number so you can fix it. Validation runs locally in your browser.

What makes JSON invalid?

Common causes are trailing commas, single-quoted strings, unquoted object keys, missing commas between items, mismatched or missing brackets and braces, and comments, which standard JSON doesn’t allow. Any of these makes the document malformed JSON, and parsers will reject it.

How do I find the line and column of a JSON syntax error?

Captain JSON shows the exact error location and highlights the line and column number, along with a clear error message, so you can jump straight to the problem instead of scanning the file. The reported position is where the parser noticed the problem, which can be just after the actual mistake — for example the closing bracket that follows a trailing comma.

What does “Unexpected token” mean in JSON?

It means the parser found a character it didn’t expect at that position — such as a trailing comma before a closing bracket, a single quote where a double quote is required, or text that isn’t JSON at all, like an HTML error page returned instead of an API response. Validate the input and check the reported line and column.

Is JSON syntax validation the same as JSON Schema validation?

No. Syntax validation checks that text is well-formed JSON: correct quoting, commas, brackets and structure. JSON Schema validation checks that well-formed JSON also matches a schema — required properties, data types, allowed values and so on. A document can be valid JSON and still fail a schema. Captain JSON’s JSON Validator checks syntax; schema checks are handled by its separate JSON Schema Validator tool.

Can I validate large JSON files?

Captain JSON has been tested with files over 30MB, staying smooth for editing, formatting, searching, validating and comparing — including deeply nested objects and arrays.

Is my JSON sent to a server when I validate it?

No. Captain JSON runs entirely inside your browser. Your JSON is parsed and validated locally — nothing is uploaded or stored on a server.

What can I do with my JSON once it’s valid?

Once it validates you can make it readable with the JSON formatter, compare it against another version with JSON compare, or explore the rest of the Captain JSON toolkit — including JSONPath, JQ queries and format conversion.

Stop hunting for missing commas

Install Captain JSON and validate your next config or API payload — with the exact line and column of any error — right in your browser.

  • ✓ 100% Offline
  • ✓ Privacy First
  • ✓ Lightweight

Need more than JSON Validator? Explore all 20+ Captain JSON tools.

We use analytics cookies to understand how the site is used. No personal data is sold. See our privacy practices before choosing.