JSON Formatter and Validator Online

Paste JSON to format, validate, minify or fix it. Errors show the exact line and column, and the result is also available as a collapsible tree.

Waiting for JSON…

    Result

    What Is JSON?

    JSON, short for JavaScript Object Notation, is a plain-text format for storing and exchanging data. It is used by web APIs, apps, databases and settings files because it is light and readable by both people and programs. A JSON document is built from objects (key and value pairs in curly braces), arrays (lists in square brackets), strings, numbers, and the values true, false and null.

    Data is often sent as one long line to save space. A JSON formatter, also called a beautifier or pretty printer, adds line breaks and indentation so the structure is easy to read. A validator checks that the text follows the JSON rules and tells you where it does not.

    What This JSON Formatter and Validator Does

    How to Use the JSON Formatter

    1. Paste your JSON into the left box, drop a file onto it, or use Open a file. You can also load a public JSON address.
    2. Read the status bar. A green message means the JSON is valid. A red one explains the problem and where it is.
    3. Pick an output template and, if you like, sort the keys.
    4. Switch to Tree to explore the structure, or stay on Text to copy the result.
    5. Press Copy result or Download .json.

    Which JSON Standard Should You Choose?

    When in doubt, use RFC 8259. It is the current standard and gives the best compatibility. RFC 7159 and ECMA-404 describe the same syntax, so most documents pass all three. The original RFC 4627 is stricter: the top-level value must be an object or an array, so a document that is just a string or a number fails that check.

    Fix Common JSON Errors

    With Fix common errors switched on, the tool repairs the most frequent mistakes before it validates:

    The status bar lists what was changed. The repair makes sensible guesses, so always check that the result still means what you intended. If the JSON is invalid and the tool thinks a repair would work, it tells you to turn the option on.

    Common JSON Errors and What They Mean

    Working With Encoded Data

    JSON in the real world is often wrapped in something else. API tokens, webhook payloads and config values frequently carry JSON as Base64 text. Decode it with the Base64 Encoder/Decoder, then paste the result here to read it.

    JSON is also how many crypto exchanges, wallets and tracking tools deliver trade data through their APIs. You can format and inspect an export here, but never paste API keys, secrets or private keys into any online tool. When you want to estimate the profit, tax and TDS on a trade, the Lumara Crypto Tax Calculator works from a buy price, a sell price and a quantity. It gives estimates only, not tax advice.

    Limits and Good to Know

    How the Validator Works

    The tool reads your text character by character with its own parser instead of relying only on the browser. That is why it can report the exact line and column of the first problem and explain it in plain words. Strings and numbers are kept exactly as you wrote them, so very large numbers are never rounded. It also warns about duplicate keys and stops at a nesting depth of 512. With Fix common errors on, a repair pass runs first, and the result is then checked as strict JSON.

    Example: Repairing a Broken Document

    This text has several mistakes: keys without quotes, single quotes, a trailing comma and a capitalized True.

    {name: 'Lumara', tools: [1, 2, 3,], free: True}

    With the fix option off, the tool reports: line 1, column 2: Object keys must be in double quotes. With Fix common errors on, it repairs the text (3 unquoted keys, 1 quotes, 1 trailing commas, 1 literals) and outputs:

    {
      "name": "Lumara",
      "tools": [
        1,
        2,
        3
      ],
      "free": true
    }

    Where People Use a JSON Validator

    Frequently Asked Questions

    Is my JSON uploaded or saved?

    The formatting and validation run in your browser. The tool does not send your JSON to our servers or save it. If you use the web address option, your browser contacts that address directly. The page also loads a cookie banner and an advertisement from third-party services, described in our Privacy Policy. Avoid pasting secrets.

    What is the difference between formatting and validating?

    Formatting changes how the JSON is laid out. Validating checks that it follows the rules. This tool does both together, so a successful format also means the JSON is valid.

    How do I minify JSON?

    Choose Compact (minified) as the output template. All extra spaces and line breaks are removed.

    Does the tool change my key order or numbers?

    No. Keys stay in their original order unless you switch on sorting, and numbers and strings are kept exactly as written.

    Can it fix a trailing comma or single quotes?

    Yes. Turn on Fix common errors.

    Why do I get "Invalid JSON"?

    The text breaks a JSON rule. The message names the problem and its line and column. Use the Jump to the error button to select that spot in your text.

    Does it support Unicode and emoji?

    Yes. Accented letters, Arabic, other scripts and emoji are kept as they are.

    Related Tools and Guide