JSON Formatter
Your text never leaves your browser — everything runs on your device.
Paste any JSON and format it with clean 2-space indentation, minify it to a single line, or convert a flat array of objects to CSV — the format spreadsheets open directly. The JSON formatter also validates your input and points to the exact line and column of any error, so you can fix broken JSON in seconds. Free, no signup, and your text never leaves your browser.
Frequently asked questions
Is my JSON sent to a server?
No. The JSON formatter runs entirely in your browser. Your pasted text is never uploaded, stored or shared — you can even disconnect from the internet after the page loads and it still works.
What does "JSON to CSV" do?
It converts an array of flat objects, such as [{"name":"Ana","age":30},{"name":"Bo","age":25}], into comma-separated values with a header row. Values containing commas or quotes are quoted correctly. Nested objects are converted to JSON text inside their cell.
How do I fix an "Unexpected token" error?
The error message shows the exact line and column where the JSON breaks. Common causes are a missing comma, a trailing comma after the last item, single quotes instead of double quotes, or an unclosed bracket. Fix that spot and format again.
What is the difference between formatting and minifying?
Formatting (pretty-printing) adds line breaks and indentation so JSON is easy to read. Minifying removes all unnecessary whitespace so the JSON is as small as possible, which is useful for sending data over a network.