JSON Formatter

FreePrivateInstant

Paste any JSON below. format it, validate syntax errors, or minify for production. Everything runs in your browser.

Input
Output
Ctrl+Enter Format  ·  Ctrl+Shift+M Minify

JSON Formatter, Beautifier & Validator Online

One workspace for the whole JSON lifecycle: paste a blob, validate with line and column errors, switch indentation, minify for production, sort keys for stable diffs, then copy or download. If you only need a single mode, the site also exposes dedicated beautifier, validator, minifier, and pretty-print pages. Nothing leaves your browser.

How to Use

  1. Paste JSON into the Input panel (or click "Try sample")
  2. Pick indentation: 2-space, 4-space, or Tab
  3. Click Format to beautify, or Minify to compress
  4. Copy the output or download as .json

Example

Input (minified)
{"name":"Alice","age":30,"hobbies":["reading","coding"]}
Output (formatted)
{
  "name": "Alice",
  "age": 30,
  "hobbies": [
    "reading",
    "coding"
  ]
}

Common JSON Errors & Fixes

Missing comma
{ "a": 1 "b": 2 }
→ Fix
{ "a": 1, "b": 2 }
Trailing comma
{ "a": 1, "b": 2, }
→ Fix
{ "a": 1, "b": 2 }
Unquoted keys
{ name: "Alice" }
→ Fix
{ "name": "Alice" }
Single quotes
{ 'name': 'Alice' }
→ Fix
{ "name": "Alice" }

Features

  • Pretty-print with 2-space, 4-space, or tab indentation
  • Minify with exact byte-saving stats
  • Validate with precise error location (line + column)
  • Download formatted JSON as a .json file
  • Share via URL. JSON pre-loaded from the hash
  • Live character & line count in the editor

Frequently Asked Questions

Is this JSON formatter free?

Yes, completely free with no sign-up or account required. Always will be.

Is my JSON data private?

Yes. All formatting, validation, and minification runs in your browser. Nothing is ever sent to a server. Your data stays on your machine.

How do I fix invalid JSON?

Paste your JSON and click Validate. The tool highlights the exact line and column of the error. Common fixes: add missing commas between fields, remove trailing commas, quote all keys with double quotes, and use double quotes (not single quotes) for strings.

What is the difference between Format and Minify?

Format (beautify / pretty-print) adds indentation and newlines to make JSON human-readable. Minify removes all whitespace to produce the smallest possible JSON string. Ideal for API responses and production payloads.

Related Tools