</> Online Utilitiesdev.conversiontools.online

JSON Validator — check JSON and find the exact error

Paste any JSON and see instantly whether it is valid. If it is not, the first error is pinpointed by line, column and character position, with the offending line highlighted and the likely cause explained. Valid JSON gets a full structure breakdown — keys, values, depth and types.

Try an example

One click loads a payload and validates it — three valid documents and three classic breakages, so you can see both verdicts.

Send validated JSON to…

The current JSON travels in the link itself. Very long payloads are copied to your clipboard instead, ready to paste into the next tool.

Your session

Snapshots and pinned payloads live only in this tab's memory — close or reload the page and they are gone, so your JSON is never stored. The tools rail remembers only which tools you opened in this tab (session storage, no JSON data).

Validation history

  • No snapshots yet — validate JSON and it will appear here.

Favorite payloads

  • No pinned payloads yet. Pin the current JSON to reload it in one click.

Favorite tools

  • Pin a tool below and it will appear here.

Recently used

  • No other tools used yet this session — tools you open from this page will appear here.

All encoding & conversion tools

    How to validate JSON

    1. Paste or type your JSON into the box — validation runs live as you type.
    2. Read the verdict: green means valid JSON; red shows the first error.
    3. Use the line, column and highlighted character to find and fix the error, then use Format to pretty-print the repaired JSON.

    Worked example — valid JSON

    Input (pre-loaded above): { "name": "Ada Lovelace", "age": 36, "skills": ["math", "poetry", "computing"], "active": true, "mentor": null } Verdict: Valid JSON ✓ Top-level type: Object · Keys: 5 · Total values: 9 · Max depth: 3 Objects: 1 · Arrays: 1 · Strings: 4 · Numbers: 1 · Booleans: 1 · Nulls: 1

    Worked example — invalid JSON

    Input (try the “Load broken example” button): { "name": "Ada", "skills": ["math", "poetry",], "active": true } Verdict: Invalid JSON ✗ Error: Unexpected “]” — trailing commas are not allowed in arrays. Location: line 3, column 31 — the “]” right after the comma in "poetry",]

    What the validator checks

    JSON has a small, strict grammar (RFC 8259). Strings and object keys must use double quotes — never single quotes or bare words. Items are separated by commas, and a trailing comma after the last item is an error, even though JavaScript allows it. Numbers cannot have leading zeros, a leading +, or a bare decimal point, and the only literal values are true, false and null — NaN, Infinity and undefined are not JSON. Comments (// or /* */) are never allowed. This page first runs the browser's built-in parser; if that fails, it runs its own strict parser so the first error is always reported with an exact line, column and character position — browsers' built-in error messages vary and newer ones omit the position entirely.

    Common JSON errors and fixes

    ErrorWhy it failsFix
    Trailing comma{"a": 1,} — a comma must be followed by another item.Delete the comma before } or ].
    Single quotes{'a': 'x'} — JSON strings require double quotes.Replace ' with ".
    Unquoted key{a: 1} — keys must be quoted strings.Write {"a": 1}.
    Missing comma{"a": 1 "b": 2} — items must be separated.Add the comma: {"a": 1, "b": 2}.
    Comments// note copied from JavaScript is not JSON.Remove all comments.
    NaN / Infinity / undefinedThese are JavaScript values, not JSON.Use a number, or null when there is no value.
    Leading zero007 is not a valid JSON number.Write 7, or quote it as a string "007".
    Extra textAnything before or after the JSON value breaks parsing.Keep only the JSON document itself.

    What to do after validating

    A green verdict is usually a waypoint, not the destination. The Send validated JSON to… bar under the results carries the current JSON into the next tool for you:

    1. Make it readable — send it to the JSON Formatter to pretty-print it with your choice of indent, sorted keys and a tree view.
    2. Turn it into a table — arrays of objects convert cleanly with JSON to CSV for spreadsheets and imports.
    3. Encode it for transport — Base64 for embedding in headers or tokens, or the URL Encoder/Decoder when JSON has to travel inside a query string.
    4. Keep a reference offline — download the cheat sheet from the tool above: the grammar rules, the error table and fixes, plus your current verdict, in one text file.

    Working the other way? Convert a spreadsheet export with CSV to JSON, or generate a test payload with the Fake Data Generator, then chain the result back here to check it.

    Frequently asked questions

    What does a JSON validator check?

    It parses your text against the JSON grammar (RFC 8259): strings must use double quotes, object keys must be quoted strings, commas separate items with no trailing comma, numbers follow a strict format, and the only literals are true, false and null. If any rule is broken, the document is not valid JSON.

    Why does the validator report a line and column?

    Browser JSON parsers report errors inconsistently — some give only a character position, newer ones give no position at all. This page runs its own strict parser after the built-in check fails, so the first error is always reported with an exact line, column and character position, plus the offending line with a marker under the problem character.

    What are the most common JSON errors?

    Trailing commas after the last item, single-quoted strings, unquoted object keys, comments copied from JavaScript, missing commas between items, and non-JSON values such as NaN, Infinity or undefined. The validator names the likely cause for each of these.

    What is the difference between the JSON Validator and the JSON Formatter?

    The validator answers one question — is this JSON valid, and if not, where is the first error? The formatter assumes valid JSON and re-indents it for readability. This page includes Format and Minify buttons for convenience, but its verdict and error location are the main job.

    Is my JSON uploaded or stored?

    No. Validation runs entirely in your browser with JavaScript; nothing you paste is uploaded, stored or sent to a server, so it is safe for configuration files and API payloads.

    Can valid JSON still be wrong?

    Yes. A validator checks syntax only — that the document follows the JSON grammar. It cannot check that keys are spelled as an API expects, that a value has the right type for its field, or that required fields exist. That is schema validation, a separate step.

    Can I send my JSON straight to the formatter or converters?

    Yes. Use the Send validated JSON to… bar under the results: it carries the current JSON in the link to the JSON Formatter, JSON to CSV converter, Base64 or URL encoder, so you can format, convert or encode it without copying and pasting. Very long payloads are copied to your clipboard instead.

    Does this page remember my JSON between visits?

    No. Validation history, pinned favorites and the recently-used tools list live only in this tab's session memory and disappear when you close or reload the tab. Your JSON itself is never written to storage, uploaded or tracked — close the tab and it is gone.

    Related encoding & conversion tools

    About this tool

    The JSON Validator is one of 33 free utilities in the Online Utilities Suite at dev.conversiontools.online. Every tool runs entirely in your browser — your data is never uploaded or tracked — so validation is instant and private, even for large payloads. Pair it with the JSON Formatter to pretty-print valid JSON, or the JSON to CSV converter to move data into a spreadsheet.

    Privacy

    This page processes everything locally in your browser: no account, no uploads, and nothing you paste is sent to a server. Validation history and pinned payloads exist only in this tab's memory and vanish when you close or reload the page; the tools rail uses session storage to remember tool names only — never your JSON. Advertising on this site is served by Google AdSense, which may use cookies to personalize ads; you can opt out of personalized advertising in your Google ad settings.