JSON Formatter
Paste JSON into the editor below to format it instantly. Donfig's JSON formatter beautifies, validates, and repairs JSON entirely in your browser — no upload, no sign-up, no ads. Choose 2-, 3-, or 4-space indentation, switch between text view and a collapsible tree, and copy or download the formatted result. Errors are highlighted with the line and column so you can fix invalid JSON quickly. The Repair button auto-fixes common issues like missing quotes and trailing commas. Big-number mode preserves long integer IDs that JavaScript's standard parser would round.
JavaScript is required to use the live tool. Please enable JavaScript and reload.
Frequently asked
Is this JSON formatter free?
Yes. Donfig is free, has no ads, no sign-up, and no usage limits. Every operation runs in your browser.
Does my JSON get uploaded?
No. Formatting, validation, and repair all run client-side. Your data never leaves the page unless you explicitly use the Load from URL feature.
Can I format very large JSON files?
Drag-and-drop accepts files up to 8 MB. Pasting directly into the editor works for larger inputs, limited only by your machine's memory.
Why does my JSON show a syntax error?
Common causes: trailing commas, single quotes, unquoted keys. Click Repair to auto-fix them, or read the line/column in the error chip and edit manually.