Guides/Tool Guides

JSON Format / Minify Guide

Format, minify and validate JSON.

Overview

Pretty-print or minify JSON instantly, with syntax validation. This is useful when debugging API responses, cleaning up config files, or preparing compact payloads for logs and tickets. Everything runs locally in your browser by default.

Pro time-savers

  • Batch format/minify (per line)

Use cases

  • Inspect and reformat a large API response before sharing it in an issue.
  • Minify JSON to reduce payload size for copy/paste into CLI tools or docs.
  • Validate JSON before committing it to a config repository.

Common pitfalls

  • Many “JSON” snippets online are actually JavaScript objects (single quotes, trailing commas). Convert to strict JSON first.
  • If you paste logs that contain multiple JSON objects, wrap them into an array or extract a single object before formatting.
  • If values appear to change, it’s usually because the input wasn’t strict JSON (or got edited) rather than the formatter changing semantics.

FAQs

Why is my JSON invalid?

Common causes are trailing commas, missing double-quotes, or JSON-like formats (JS objects, comments, single quotes). Convert it to strict JSON first.

What’s the difference between “format” and “minify”?

Format adds indentation and newlines to improve readability; minify removes whitespace to make the output compact.

Will this upload my JSON?

No. Formatting and validation happen locally in your browser.

Why do numbers/booleans look different after formatting?

Formatting doesn’t change values, but it may normalize spacing. If values changed, your input likely wasn’t strict JSON.

Examples

Input

{"a":1,"b":[2,3]}

Output

{
  "a": 1,
  "b": [
    2,
    3
  ]
}