JSON formatter & validator
Pretty-print, validate and minify JSON, with syntax errors reported by line and column instead of a raw character offset. It runs entirely in your browser, which matters because real payloads tend to contain tokens and customer data.
- Nothing you type leaves this page
- Works offline once loaded
- Free forever, no signup
Preparing JSON Formatter for you…
Loading the tool into your browser. Nothing is uploaded — the work happens on your device.
Valid JSON.
- Keys {{ stats.keys }}
- Depth {{ stats.depth }}
- Minified {{ stats.minified }} chars
- Saved {{ stats.saved }}%
How to use this tool
-
Paste your JSON
Valid or not — if it fails to parse you get the line and column of the problem.
-
Format or minify
Choose an indent width, optionally sort the keys, or collapse everything to a single line.
-
Copy the result
Take the formatted output back to your editor.
Questions people ask
Is anything I paste here sent to a server?
No. The whole tool is JavaScript running in your browser, and this site has no endpoint that accepts text. That matters when what you are pasting is a real API payload, a customer record, or a password.
Why does my JSON fail to parse?
The usual causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, or a stray comment — none of which JSON permits, even though JavaScript does. The error message points at the line and column so you can find it quickly.
What does sorting the keys do?
It orders every object's keys alphabetically, at every level of nesting. That makes two versions of the same payload directly comparable in a diff, which is otherwise painful when the server returns keys in an arbitrary order.
How large a file can it handle?
Anything up to a few megabytes formats instantly. Very large documents are limited only by your device's memory, since there is no upload and no server-side size cap.
Does minifying change the data?
No. Minifying removes only whitespace and line breaks, which JSON ignores. The parsed result is identical, just smaller to transmit.
Related tools
- Word Counter Count words, characters, sentences and reading time as you type. Free, instant, and the text nev...
- Case Converter Convert text between UPPER CASE, lower case, Sentence case, Title Case, camelCase, snake_case an...
- Password Generator Generate strong random passwords and memorable passphrases in your browser. Nothing is transmitt...
Bookmark this page — the tool keeps working offline, and your settings stay in this browser. Built by Dynamb Technologies, who make software for a living.