Format JSON with pretty print, minify, and custom indentation. Transform JSON between readable and compact formats. Free, no registration required.
Last updated: March 2026 • Formats: Pretty-print, Minify, Sort Keys
JSON formatting transforms JSON between two main states:
Pretty-Printed JSON: Readable, indented, with line breaks. Easy for humans to read and edit.
Minified JSON: Compact, no whitespace, single line. Ideal for APIs, file storage, and transmission.
JSON Visualiser lets you switch between formats instantly, with options for indentation size, key sorting, and more.
Transform compact JSON into readable, indented format:
Options:
Transform readable JSON into compact format:
Benefits:
Reorder object keys alphabetically for consistency:
Benefits:
Navigate to the JSON Visualiser homepage. No sign-up required.
Paste your JSON into the editor, or type directly. Monaco editor provides syntax highlighting.
Use the formatting toolbar:
Copy the formatted JSON to your clipboard, or use the tree/graph views to explore the structure.
Pretty-print configuration files for readability:
Minify API responses for faster transmission:
Sort keys for consistent data exports:
Compact but readable:
Best for: Most use cases, modern coding standards
More indentation, clearer nesting:
Best for: Very nested JSON, learning purposes
Uses actual tab characters:
Best for: Editor-specific preferences, legacy systems
Use pretty-print formatting:
Use minified formatting:
Use consistent formatting:
Use pretty-print with consistent order:
Format multiple JSON files:
Or paste multiple JSON objects into JSON Visualiser and format them one by one.
JavaScript objects maintain key insertion order (ES2015+). By default, JSON Visualiser preserves this order unless you choose to sort keys.
JSON supports Unicode characters in strings. Pretty-printing doesn't escape Unicode by default, but you can choose to escape for specific use cases.
Pretty-printing handles special characters correctly:
\n\t\" or \'\\JSON has no native date type. Dates are typically strings in ISO 8601 format:
Format, pretty-print, and minify JSON instantly. No registration, instant load, and multiple formatting options for every use case.
References: JSON.stringify() documentation, Python json module, PHP json_encode().
Transform your JSON between pretty-print and minified formats. Features include custom indentation, key sorting, and instant preview—all without registration.
Try JSON Formatter// Minified{"name":"John","age":30,"active":true}// Pretty-Printed (2 spaces){ "name": "John", "age": 30, "active": true}// Pretty-Printed{ "name": "John", "age": 30, "active": true}// Minified{"name":"John","age":30,"active":true}// Original order{ "name": "John", "age": 30, "city": "NYC"}// Sorted keys{ "age": 30, "city": "NYC", "name": "John"}{ "database": { "host": "localhost", "port": 5432, "name": "myapp", "credentials": { "username": "admin", "password": "secret" } }, "api": { "timeout": 30000, "retries": 3 }}{ "status": "success", "data": { "id": 123, "name": "Product", "price": 99.99 }, "timestamp": 1640995200}{ "email": "user@example.com", "id": "abc-123", "name": "John Doe", "role": "admin"}{ "key": "value", "nested": { "item": "data" }}{ "key": "value", "nested": { "item": "data" }}{ "key": "value", "nested": { "item": "data" }}# Format all .json files with jqfind . -name "*.json" -exec jq '.' {} > {}.formatted && mv {}.formatted {} \;# Minify all .json filesfind . -name "*.json" -exec jq -c '.' {} > {}.minified && mv {}.minified {} \;{ "createdAt": "2026-03-04T12:00:00Z", "updatedAt": "2026-03-04T14:30:00Z"}const data = { name: "John", age: 30 };const pretty = JSON.stringify(data, null, 2); // 2-space indentconst minified = JSON.stringify(data);import jsondata = {"name": "John", "age": 30}pretty = json.dumps(data, indent=2)minified = json.dumps(data, separators=(',', ':'))$data = ["name" => "John", "age" => 30];$pretty = json_encode($data, JSON_PRETTY_PRINT);$minified = json_encode($data);