JSON Formatter
Beautify, minify, validate, sort keys and convert JSON to CSV — with syntax highlighting.
About this tool
A free JSON formatter, beautifier, validator and minifier. Paste JSON (or drop a .json file on the input) and it is re-formatted as you type, with color-coded keys, strings, numbers, booleans and null values. Switch the action to minify, sort keys at every nesting level, or convert an array of objects into CSV.
Features
- Beautify with 2 spaces, 4 spaces or tabs.
- Validate with the exact line and column of the first syntax error, plus a hint on how to fix it.
- Lossless: numbers are written exactly as in the input (
12345678901234567890and1e400stay intact), and duplicate keys are kept and reported. - Minify to strip whitespace for transport.
- Sort keys alphabetically, recursively.
- JSON to CSV for arrays of objects (nested values are written as JSON).
- Escape non-ASCII characters as
\uXXXXfor ASCII-only transports. - Size stats: original vs. result bytes (UTF-8) and the difference.
- Fullscreen output, copy and download as .json or .csv.
Keyboard shortcuts
Ctrl+Enter (⌘+Enter on Mac) runs the selected action · Esc closes fullscreen.
Privacy & security
All JSON is processed in your browser by a strict, lossless parser that runs on the page. Nothing is sent to a server, stored, or logged, and there is no share or history feature. The highlighted output is built with DOM text nodes only — never innerHTML — so a malicious payload cannot inject markup or scripts.