JSON Validator

Check whether JSON is valid and get the exact line, column and reason for any error — with a one-click repair for the common mistakes. Runs entirely in your browser.

Session History

Formatted JSON from this session will appear here.

    History is kept only in your browser memory for this session and is cleared when you refresh or close the page. Nothing is stored or uploaded.

    Validation runs locally in your browser — your JSON is never uploaded. This tool validates JSON syntax (RFC 8259); it does not validate against a JSON Schema.

    What It Does

    This tool answers one question fast and clearly: is this JSON valid, and if not, why? Paste any JSON and it gives you an immediate green or red verdict. When the document is valid it confirms it and summarises the structure. When it is invalid it does what most tools fail to do — it tells you the exact line and column of the error, draws a caret at the precise character, and explains the cause in plain language rather than a cryptic parser message. It checks the full JSON grammar: double-quoted keys and strings, correctly matched braces and brackets, no trailing commas, no comments, and valid escapes. It also flags duplicate keys, which are technically allowed but silently drop data. And if the input is broken in a common way, one click on Repair fixes it. Everything happens locally in your browser.

    When to Use It

    • An API call or config load is failing with a vague JSON error and you need to know the exact character that is wrong.
    • You are pasting JSON from a log, a chat message, or a code editor and want to confirm it is valid before using it.
    • You received JSON that might contain JavaScript-isms — comments, single quotes, trailing commas — and need to verify and clean it.
    • You want to confirm there are no duplicate keys silently overwriting values before you ship a payload.

    Worked Examples

    {"name":"Ada","roles":["admin","user"],"active":true}

    Valid JSON. The verdict turns green and the structure summary confirms the key count, depth and value types.

    {"a":1,"b":2,}

    Invalid — a trailing comma before the closing brace. The validator marks it red and points a caret at the exact comma.

    {'name':'Ada', // user 'active':true}

    Invalid in three ways: single quotes and a comment. Click Repair to convert quotes, strip the comment, and re-validate to green.

    {"id":1,"id":2}

    Valid JSON, but it contains a duplicate key. The tool flags that id=1 will be silently discarded in favour of id=2.

    Features

    Instant valid/invalid verdict as you type
    Exact line and column of the first error
    Caret pointing at the precise failing character
    Plain-English explanation of every error
    One-click Repair for commas
    quotes
    keys and comments
    Duplicate-key detection with path and line number
    Structure summary on valid input
    Import a .json file by browse or drag-and-drop
    In-memory session history cleared on refresh
    Fully browser-based with no server uploads

    How to Use

    1. Paste or type your JSON. 2. Read the verdict: green means valid, red means invalid. 3. For invalid JSON, check the line, column, caret and explanation, then click Repair to auto-fix common issues. 4. Review any duplicate-key warnings. 5. Use Copy or Download for the cleaned result.

    Common Mistakes

    • Assuming a JSON validator checks your data shape. It checks syntax, not a JSON Schema — a syntactically valid document can still have the wrong fields.
    • Pasting JSON with comments or trailing commas from a JS file. Strict JSON allows neither; use Repair to clean it.
    • Ignoring duplicate-key warnings. They are valid syntax but cause silent data loss, so treat them as real bugs.
    • Trusting that 'it parsed in my code' means it is valid JSON — some languages accept relaxed input that standard JSON parsers reject.

    Frequently Asked Questions