JSON Formatter

Paste raw or minified JSON and instantly pretty-print it with 2 or 4 space indentation. Validates and pinpoints syntax errors.

Input JSON

Indent

Formatted Output

Paste JSON and click Format

or press Ctrl+Enter

Copied!

Summary

Paste raw or minified JSON and instantly pretty-print it with 2 or 4 space indentation. Validates and pinpoints syntax errors.

How it works

  1. Paste or type your JSON into the input panel.
  2. Select an indentation level: 2 spaces or 4 spaces.
  3. Click Format (or press Ctrl+Enter) to pretty-print.
  4. View the formatted output with character and line count stats.
  5. Click Copy Output to copy the result to your clipboard.
  6. Use Minify to collapse the JSON back to a single line.

Use cases

  • Read API responses that arrive as a single minified line.
  • Debug config files with deeply nested structures.
  • Verify that a JSON payload is syntactically correct before sending.
  • Standardize indentation across team members with different editors.
  • Quickly count lines and characters in a JSON document.
  • Convert between compact and readable forms during development.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu