JSON formatter and validator

Paste JSON to make it readable, find what’s broken, or minify it.

Output settings

What it does

Make JSON readable, check that it’s valid, or shrink it for production. Errors point to the exact line and column with a plain explanation, such as a trailing comma, a missing quote or a comment, which JSON doesn’t allow. Unlike many formatters, this one never changes your data: long numbers such as IDs keep every digit, and text keeps its escapes exactly as written. It also warns about duplicate keys, which most programs silently drop. Your JSON stays in your browser, so API responses and config files with secrets aren’t sent anywhere.

How to use it

How it works
  1. Paste your JSON into the box, drop a .json file onto it, or click “Open a file”.
  2. It’s checked as you type. If something is wrong, you’ll see the line, the column and what to fix; “Show me” puts the cursor right on it.
  3. Choose “Format” for readable, indented JSON or “Minify” for the smallest version, and optionally sort the keys.
  4. Copy the result, or download it as a .json file.

Common uses

  • Reading a minified API response while debugging
  • Finding the typo that breaks a config file such as package.json or tsconfig.json
  • Minifying JSON before embedding it in a page or sending it over the network
  • Sorting keys so two JSON files can be compared line by line in a diff

Tips

  • JSON is stricter than JavaScript: keys and strings need double quotes, and trailing commas, comments, undefined and NaN aren’t allowed.
  • IDs longer than 15–16 digits lose precision in JavaScript. If an ID looks different after JSON.parse, send it as a string instead.
  • Duplicate keys are technically allowed, but different programs keep different values, so it’s safest to remove them.

Questions

Is my JSON uploaded anywhere?

No. Parsing and formatting run in your browser, so tokens, customer data and config files stay on your device.

Why do some formatters change my numbers?

Most of them read JSON with JavaScript, which stores numbers as 64-bit floats and rounds anything beyond about 15 digits. This formatter keeps numbers as text, so 12345678901234567890 stays exactly that.

Can it fix my JSON automatically?

No, and that’s deliberate: guessing could change what your data means. It tells you exactly where the problem is and what’s wrong, so you can fix it in a second.

How large a file can it handle?

Files of several megabytes format in a moment. Up to about 20 MB works, though the text box gets slower to scroll at that size.

Related tools

  • JWT decoder and verifier

    Decode a JWT to read its header, payload and expiry, and check its signature with a secret or public key. Runs in your browser; the token stays private.

  • Base64 encoder and decoder

    Encode text or files to Base64 and decode Base64 back, with proper UTF-8, URL-safe Base64 and file detection. Free, in your browser, no upload.

  • URL encoder and decoder

    Percent-encode text for URLs and query strings, or decode %20-style escapes back to text. Handles UTF-8, + for spaces and splits URLs into parts.

  • UUID generator

    Generate UUID v4 or v7 values, one or a thousand at once, with the browser’s secure random generator. Check any UUID’s version and creation time.

  • Hash generator and checksum checker

    Calculate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files, and check a download against its checksum. In your browser, no upload.

  • Compress images

    Shrink image file size without visible quality loss. Private, fast, free.