Format, beautify, validate, and minify JSON.
Paste your raw JSON into the Input box and click Format / Beautify for clean, indented output — or Minify to compress it to a single line. Click Validate to check syntax without changing the data. Everything runs in your browser; nothing is sent to any server.
JSON (JavaScript Object Notation) is a lightweight data-interchange format defined in RFC 8259. Raw JSON returned from APIs is often a single long line with no whitespace — hard to read and impossible to debug at a glance. Formatting (also called prettifying or beautifying) rewrites that output with consistent indentation and newlines so the structure is immediately visible. This tool uses 2-space indentation, matching the JSON.stringify(obj, null, 2) convention used in most JavaScript projects.
Minification does the reverse: it strips all non-essential whitespace to produce the smallest possible JSON string. Minified JSON is preferred in HTTP request bodies, API payloads, and configuration files where size matters.
const raw = '{"name":"Alice","age":30,"active":true}';
const parsed = JSON.parse(raw);
// Beautify (2-space indent)
const pretty = JSON.stringify(parsed, null, 2);
// Minify
const compact = JSON.stringify(parsed);
import json
raw = '{"name":"Alice","age":30,"active":true}'
obj = json.loads(raw)
# Beautify
pretty = json.dumps(obj, indent=2)
# Minify
compact = json.dumps(obj, separators=(',', ':'))
curl -s https://api.example.com/data | python3 -m json.tool
JSON.parse() and JSON.stringify() functions. Nothing leaves your device.// or /* */ comments). The error message indicates where parsing failed.curl -s https://... | python3 -m json.tool, or paste the raw output here.tsconfig.json and settings.json, or HJSON.