JSON Linter - Online JSON Validator & Syntax Checker

Idle - No JSON linted yet
0 lines 0 characters
Lint results will appear here after you run the linter.

About This Linter

This linter validates JSON syntax and structure using the native browser JSON.parse. It attempts to surface multiple syntax errors by re-running the parser after masking earlier issues. All processing happens entirely in your browser - no data is sent to any server.

A JSON linter is a tool that checks your JSON data for syntax errors, structural problems, and common formatting issues before that JSON is consumed by applications or APIs. A single misplaced comma, missing quote, or extra brace can break an entire integration.

FeatureDescription
100% Client-SideYour JSON never leaves the browser
Fast FeedbackErrors highlighted with line-level context
Formatted PreviewSee pretty-printed version of your JSON
Multiple ErrorsSurfaces several issues in one pass
Safe for Sensitive DataNo backend storage or logging

The most frequent JSON error is incorrect comma placement:

// Wrong - trailing comma
{
  "name": "app",
  "version": "1.0",  // <-- trailing comma not allowed
}

// Wrong - missing comma
{
  "name": "app"
  "version": "1.0"  // <-- missing comma
}

// Correct
{
  "name": "app",
  "version": "1.0"
}

JSON requires double quotes for all strings:

// Wrong - unquoted key
{
  name: "app"
}

// Wrong - single quotes
{
  'name': 'app'
}

// Correct
{
  "name": "app"
}
// Wrong - undefined is not valid JSON
{
  "value": undefined
}

// Wrong - NaN is not valid JSON
{
  "value": NaN
}

// Correct - use null for missing values
{
  "value": null
}

Validate REST API request and response bodies:

{
  "userId": 123,
  "action": "update",
  "data": {
    "email": "user@example.com",
    "preferences": {
      "notifications": true,
      "theme": "dark"
    }
  }
}

Lint package.json, tsconfig.json, and other config files:

{
  "name": "my-project",
  "version": "1.0.0",
  "scripts": {
    "build": "tsc",
    "test": "jest"
  },
  "dependencies": {
    "express": "^4.18.0"
  }
}

Validate GitHub Actions JSON expressions, AWS CloudFormation, and more:

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "MyBucket": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketName": "my-bucket"
      }
    }
  }
}

Lint MongoDB documents, Elasticsearch queries, and NoSQL data:

{
  "_id": "doc123",
  "type": "user",
  "profile": {
    "name": "John Doe",
    "tags": ["admin", "developer"]
  },
  "createdAt": "2024-01-15T10:30:00Z"
}

JSON is not the same as JavaScript objects. Key differences:

FeatureJSONJavaScript
KeysMust be double-quotedCan be unquoted
StringsDouble quotes onlySingle or double quotes
CommentsNot allowedAllowed
Trailing commasNot allowedAllowed (ES5+)
FunctionsNot allowedAllowed
Pro Tip
If you’re pasting JavaScript object literals, make sure to convert them to valid JSON first by double-quoting keys and removing trailing commas.

All processing happens directly in your browser:

  • No Server Communication: Your JSON data never leaves your device
  • No Storage: Nothing is saved to localStorage, cookies, or servers
  • Open Source: All code is transparent and auditable

Explore our other DevOps tools:


Need help? All code is open-source. Visit our GitHub or contact us with questions or feedback.