Formatter
Pretty-print, minify and sort keys · worked in this tab, never sent anywhere
Input
Formatted
The work
Pretty-print JSON with the indentation you want, minify it back down, or sort keys alphabetically for stable diffs. Runs entirely in your browser.
Paste or drop a document on the left and the formatted result appears on the right as you type. Choose two, three or four spaces, or tabs — whichever your project uses. Switch to Minify to strip every byte of whitespace, which is what you want before embedding JSON in an environment variable or a URL.
Sort keys rewrites every object with its keys in alphabetical order. Two documents that differ only in key order become byte-identical, which makes them diff cleanly in version control.
Parsing runs in a Web Worker, so even multi-megabyte documents format without the page going unresponsive while you type.