No. 07 · PDF, image, text and code

JSON formatter and validator

Paste an API response, a config file or a log line and get readable, indented JSON, or find exactly where it breaks. Your browser parses the JSON itself, and it never leaves this page.

Free · no sign-up · runs in your browser · updated 15 Nov 2026

Indent

Valid JSON · 128 bytes in, 128 bytes minified

{
  "order": 1042,
  "customer": {
    "name": "Asha",
    "email": "asha@example.com"
  },
  "items": [
    {
      "sku": "TEA-250",
      "qty": 2,
      "price": 4.5
    }
  ],
  "paid": true
}

What is a JSON formatter?

A JSON formatter parses JSON text and prints it again with consistent indentation, one key per line, so it is easy to read. If the text is not valid JSON, parsing fails and the formatter reports where. Minifying does the reverse: it removes every space and line break that is not inside a string.

Features

  • Pretty-print with 2 spaces, 4 spaces or tabs
  • Validation with the line and column of the first error
  • Minify for APIs and storage
  • Sort keys A to Z to compare two documents
  • Copy, or download as .json
  • Runs in your browser; nothing uploaded

How to use the JSON formatter

  1. Paste your JSON in the box.
  2. Read the status line: valid, or the position of the first error.
  3. Choose the indent, and sort keys if you want to compare files.
  4. Copy the formatted or minified version, or download it.

The mistakes that break JSON most often

MistakeInvalidValid
Trailing comma{"a": 1,}{"a": 1}
Single quotes{'a': 'x'}{"a": "x"}
Unquoted key{a: 1}{"a": 1}
Comments{"a": 1 // note}Remove the comment
Special numbersNaN, Infinity, 0x1Fnull or a plain number

JavaScript object literals allow most of these; JSON, as defined in RFC 8259, allows none of them.

Why it matters where JSON is formatted

API responses and config files often hold access tokens, customer emails and internal addresses. Many online formatters send what you paste to their server. This one uses the browser's own JSON.parse and JSON.stringify, so the text stays on your device; once the page has loaded it keeps working with the internet switched off.

Frequently asked questions

Is my JSON uploaded or stored?

No. It is parsed and formatted in your browser tab and is gone when you close it.

Is there a size limit?

No fixed limit. A few megabytes format quickly on a modern computer; very large files depend on your device's memory.

Does sorting keys change the data?

No. Key order has no meaning in a JSON object, so the data is the same. The order of items in arrays is kept.

Can it fix invalid JSON for me?

No. It shows where the first error is so you can fix it; guessed fixes could silently change your data.

Last updated 15 November 2026. Made by Criza Labs. Spotted a mistake? Tell us.

No. 08 · PDF, image, text and code

JWT Decoder

Decode a JSON Web Token in your browser to read its header and claims, with issued and expiry times in your time zone.

No. 09 · PDF, image, text and code

Base64 Encode & Decode

Encode text to Base64 or decode Base64 back to text, with full UTF-8 for emoji and Indian scripts and a URL-safe option.

No. 05 · PDF, image, text and code

Case Converter

Convert text to UPPERCASE, lowercase, Sentence case, Title Case, camelCase, snake_case, kebab-case and more in one click, then copy.

Made by Criza Labs

Need a custom tool for your team or customers?

Criza Labs builds tools like this into websites, billing systems and internal apps: with your branding, your data and your workflow. Fixed scope, fixed price, and you own the code.