About JSON Viewer
This JSON viewer shows your JSON as a tree you can open and close. Each object and array shows how many items it holds, and a click on any key copies its JSON path. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
The root is written $. Below it, objects list their keys and arrays list their items by position. Click a key and its path goes to your clipboard, for example $.user.roles[0] for the first role of a user. A key that is not a plain name, such as one with a space, is written with brackets and quotes, like $.users[0]["first name"].
Paths like these are what you need for jq filters, JSONPath queries, test assertions and code that picks a value out of a response. The tree saves you from counting brackets in a long document. The branches start open, so collapse the ones you do not need. Object branches show their size in braces, such as {4}, and arrays in brackets, such as [2].
The viewer needs valid JSON. If your text has an error, you see its line and column first, and an Auto-fix button for common mistakes. Use Format to read the full text instead of the tree.
How to use JSON Viewer
- Paste your JSON into the box. The tool checks it as you type and shows Valid JSON or the error.
- Choose a tab: Format to pretty-print, Minify to remove whitespace, Validate to check only, Sort keys to order the keys, Tree to browse, Escape to make or read a JSON string, or To CSV for a table.
- For Format and Sort keys, choose the indent: 2 spaces, 4 spaces or Tab.
- If you see Invalid JSON at line and column, go to that position. For a common mistake, press Auto-fix and check the result.
- In Tree, open and close branches, and click a key to copy its JSON path, such as $.users[0].name.
- Use Copy to take the output, or Download to save it as a .json file (a .csv file for To CSV).
Features
- Pretty-print with 2 spaces, 4 spaces or tabs.
- Minify to a single line with no extra whitespace.
- Validation that reports the line, the column and a plain-English message for the first error.
- Auto-fix for single quotes, unquoted keys, trailing commas and comments. The button only appears when the repaired text is valid.
- Tree view with collapsible branches, item counts and one-click copy of the JSON path of any key.
- Sort keys alphabetically at every level, without changing array order.
- Escape and unescape a JSON string. Unescape reads Unicode escapes, including emoji pairs.
- JSON to CSV for an array of objects, with the union of all keys as the header.
- Copy and Download of the result.
- All processing happens in your browser tab, with no server round trip.
Worked examples
Click the key "name" under the first item of "users" gives $.users[0].name
Click a key called "first name" in the first user gives $.users[0]["first name"]
A key that is not a plain name needs brackets and quotes.
Privacy: how it works
- Your JSON is processed by code in your browser tab. Nothing is sent to Ulkaa or to any other server, which you can confirm in the Network tab of your browser developer tools.
- API responses, config files and database exports often contain tokens, emails and personal data, so a formatter that does not upload them is the safe kind to paste into.
Tips
- Fix the first error only, then look again. Later errors often vanish, because one missing quote can make everything after it look wrong.
- Sort the keys of two JSON files with the same settings before you compare them. A text diff then shows only the real differences.
- Use the Tree view to find a path, then copy it. That is quicker than counting brackets in a long response.
- To put text with quotes and line breaks into a JSON field, paste it in Escape and copy the result between the quotation marks.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your JSON are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your JSON are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
How do I get the path of a value in JSON?
Open the Tree view and click the key. The JSON path, such as $.user.name, is copied to your clipboard.
What does the $ mean in a JSON path?
It stands for the root of the document. The rest of the path follows from it with dots for keys and square brackets for array positions, which count from 0.
Can I search inside the tree?
There is no search box. Use the browser find command on the page, or collapse branches to narrow it down.
More JSON Formatter and Validator pages
- JSON Formatter and ValidatorFormat, minify and validate JSON, find errors by line and column, browse it as a tree, and fix common mistakes in one click.
- JSON ValidatorCheck that your JSON is valid and find the first error by line and column.
- JSON MinifierRemove the extra whitespace from JSON to make it smaller.
- JSON BeautifierPretty-print JSON so it is easy to read.
- JSON LintLint your JSON, find the error, and fix the usual mistakes.
- JSON Escape and UnescapeEscape quotes, backslashes and line breaks for JSON, or turn an escaped string back into plain text.
- JSON Key SorterSort the keys of every object in your JSON alphabetically.
- JSON to CSV ConverterTurn a JSON array of objects into a CSV table you can open in a spreadsheet.