{ }jsonkit
Tools/Format/JSON Formatter
Search tools…⌘K
Format
{ }JSON Formatter
≡→JSON Minifier
\"JSON Escape / Unescape
Validate
JSON Validator
±JSON Diff / Compare
§JSON Schema Generator
JWT Decoder
Convert
→csvJSON to CSV
csv→CSV to JSON
⇄ymlJSON ⇄ YAML
⇄xmlJSON ⇄ XML
→tsJSON to TypeScript
Query
$.JSONPath / JQ Tester
Generate
Mock JSON Data Generator
{ }

JSON Formatter & Beautifier

Beautify or minify JSON — runs locally, nothing is uploaded.
processes as you type · client-side
Sample
Upload
Indent
24tab
Minify
⧉ Copy output ⌘C
Download
Share
Clear
Input219 B · paste or drop a file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Output
codetree
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ "id": "usr_8x42", "name": "Ada Lovelace", "email": "ada@example.com", "active": true, "roles": [ "admin", "editor" ], "plan": { "tier": "pro", "seats": 5, "renews": "2026-08-01" } }
✓ valid (RFC 8259)219 B → 219 B0.0 msLn 1, Col 1UTF-8

About JSON Formatter

The JSON formatter takes minified, messy or hand-edited JSON and pretty-prints it into clean, indented, readable text. Paste an API response, a config file or a log line and it beautifies the structure instantly so you can actually see the objects, arrays and nesting you are working with.

It runs entirely in your browser. Nothing you paste is uploaded, logged or sent to a server — the formatting happens in JavaScript on your own machine, so it is safe for production payloads, tokens and customer data. Turn off your network and it still works.

It is built for developers, data engineers, QA testers and anyone who reads JSON all day: quickly reformat a payload from the network tab, tidy a config before committing, or collapse everything back down with the minify toggle. Free forever, no signup, no file-size gate.

How it works

Indentation: 2, 4 or tabs

Pick 2 spaces (the most common default), 4 spaces, or tab indentation. The choice re-renders the output immediately. Two-space indentation keeps diffs small and matches Prettier and most linters; tabs suit teams that indent with tabs everywhere else.

Minify with one toggle

Flip the Minify switch to strip every non-essential space and newline, producing the smallest valid payload on a single line. This is the exact output you want to ship over the wire or embed in a request body, and it round-trips losslessly back to the pretty view.

Strict parsing, precise errors

The formatter parses with the browser's native JSON engine, so it is strict RFC 8259: no comments, no trailing commas, no single quotes. If the input is invalid you get the error message plus the line and column of the first problem instead of a silent blank output.

Key order and types are preserved

Formatting never reorders your keys or changes values. Numbers, booleans, null and strings come out exactly as they went in — only whitespace changes. Unicode escapes inside strings are left intact so nothing is lost in the round trip.

Frequently asked questions

Is it safe to paste production JSON here?

Yes. All formatting happens locally in your browser with JavaScript — the JSON is never uploaded or sent anywhere. You can even disconnect from the internet and the tool keeps working.

What indentation should I use, 2 or 4 spaces?

Two spaces is the safest default: it matches Prettier, most linters and keeps version-control diffs compact. Use 4 spaces or tabs only if your project's style guide requires it.

Why does it say my JSON is invalid?

The formatter uses strict RFC 8259 parsing, which rejects trailing commas, comments and single-quoted keys or strings. The error message points to the line and column of the first problem so you can fix it.

Does formatting change my data?

No. Only whitespace changes. Keys stay in their original order and every value — numbers, strings, booleans, null — is preserved exactly.

Is there a file-size limit?

There is no artificial limit. Very large documents (tens of megabytes) depend on your device's memory since everything runs in the browser tab, but typical API responses and config files format instantly.