JSON Formatter
Pretty print JSON or squeeze it onto one line, and see exactly which line and column a syntax error is on. Sort keys, browse a tree view, and convert between JSON and CSV.
Format
Convert
How to use
When it helps
API responses and config files often arrive as one long line of JSON that is hard to read. Paste it here and it is indented so the structure is clear at a glance. Switch to the tree view to collapse and expand deeply nested data.
A single wrong comma or quote makes a whole JSON document unreadable. When there is an error, the tool shows the exact line and column plus the line itself, and explains common mistakes such as trailing commas or single quotes.
Want the data in Excel or Google Sheets? Convert JSON to CSV and save it. The saved file includes a BOM so non-English text displays correctly. You can also turn CSV back into a JSON array.
FAQ
How accurate is the error position?
It shows where the browser's JSON parser stopped, converted to a line and column. The actual mistake (a missing comma or an unclosed bracket) is often just before that spot.
Does it accept JSON with comments?
Standard JSON does not allow comments, so they show up as an error. Remove // and /* */ comments before pasting.
Very large numbers change.
JavaScript cannot hold integers larger than 2 to the 53rd power exactly. It is safer to keep large IDs as strings in the original data.
Accented or non-English text breaks when I open the CSV in Excel.
CSV files saved with this tool include a BOM, so Excel shows the text correctly. If you copy and paste instead, choose UTF-8 in Excel's text import.
Is my data sent to a server?
No. Everything is processed in your browser, so even sensitive data such as internal API responses stays on your device.