Result
JSON formatter
Paste an API response, a config file or a log line and get readable JSON in one click. The formatter checks your JSON as you type and points to the first error with its line, column and reason. Beautify with 2 or 4 spaces or tabs, minify for transport, sort keys, explore a collapsible tree with type badges and counts, search it, and copy the path of any value. Nothing is uploaded. Paste, type or drop JSON in the editor. It is checked as you type, and the first error is shown with its line and column. Format or minify it, sort the keys, browse the tree and click a key to copy its path, or convert an array of objects to CSV. Your last input is saved in this browser.
How it works
- Paste or type JSON in the editor, drop a file on it, load a file or start with the sample data.
- Read the status: valid JSON shows statistics and a tree, invalid JSON shows the line, column and reason of the first error.
- Format or minify, sort the keys, click a key in the tree to copy its path, convert an array of objects to CSV and download the result.
Errors you can fix
Instead of a vague parse error, the formatter tells you what is wrong and where: a trailing comma, a missing colon, a key without double quotes or an unterminated string. The line number is marked in the gutter and one click selects the exact character.
Fast and private
Large files of several megabytes stay responsive, because the tree only builds the branches you open. Your last input is kept in this browser only. Save the session as JSON, as a PDF or as an image, and undo or redo every change.
Frequently asked questions
How do I turn JSON into a CSV file?
Your JSON must be an array of objects. Convert to CSV makes one row per object and one column per key, in the order the keys first appear. Nested objects and arrays are written into their cell as JSON, and null becomes an empty cell. Download saves the result as a .csv file.
How do I get the path of a value in my JSON?
Click its key in the Tree view and the path is copied, for example $.users[0].email. A key with spaces or other special characters is written in brackets, such as $["first name"]. Search in tree lists every matching key or value with its path, and clicking a match shows it in the tree and copies its path.
What does sort keys do?
It orders the keys of every object alphabetically when you format or minify, which makes two versions of a document easy to compare. Arrays keep their order, because order is meaningful there.
Why is my JSON invalid?
Usually because of a comma after the last item, single quotes instead of double quotes, a key without quotes, or a comment, none of which JSON allows. Paste it in and the formatter names the first error with its line and column, so you can go straight to it.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
前往編輯器