elefcode

JSON tool

JSON Validator — free online tool

Paste any JSON to instantly check if it's valid — get the exact error message, and one-click auto-repair for the common mistakes.

What does this do?

Bad JSON is one of the most common bugs in development: a stray trailing comma, a single-quoted string, a missing key quote. This validator parses your input in a Web Worker (so the UI never freezes on huge files), shows the precise error message from the parser, and offers a one-click "Auto-Repair" that fixes the typical mistakes: trailing commas, JavaScript `//` and `/* */` comments, single-quoted strings, and unquoted object keys.

When to use it

  • Debug a JSON payload an API rejected
  • Validate `tsconfig.json`, `settings.json`, or other JSONC
  • Check a JSON Lines file before importing it
  • Auto-clean JavaScript-style object literals into valid JSON

Tip

A valid JSON document is exactly one value: object, array, string, number, boolean, or null. Strings must use double quotes. Keys must be quoted. Trailing commas, single quotes, and comments are not allowed — but the Auto-Repair button fixes all of them automatically.

Example: JavaScript-style object → valid JSON

Input — JSON

{
  // A typical eslint config — not valid JSON but Auto-Repair fixes it
  rules: {
    'no-unused-vars': 'warn',
    'no-console': 'off',
  },
  extends: ['plugin:react/recommended'],
}

Output

{
  "rules": {
    "no-unused-vars": "warn",
    "no-console": "off"
  },
  "extends": ["plugin:react/recommended"]
}

More JSON tools