How to use an online JSON viewer
A JSON viewer turns a wall of text into something you can actually read: it checks the syntax, indents the content and lets you fold and unfold nested objects. It's one of the most-used tools in day-to-day development, whether you're inspecting an API response, debugging a configuration file or exploring an unfamiliar data export.
This guide walks through a typical workflow using Dev Studio's JSON Viewer, and explains what to check before pasting data into any online tool.
Why use a JSON viewer at all?
- Minified JSON is unreadable. APIs usually send JSON on one long line to save bytes.
- Errors are hard to find by eye. A viewer points to the exact line and column.
- Deep nesting is hard to follow. A collapsible tree shows the structure without scrolling through everything.
- You often need one value. Search and path-copying get you to it quickly.
Step 1: load your JSON
Open the Text tab and either paste your JSON, press Load file, or drag a .json file onto the editor. Try it with this sample API response:
{"page":1,"perPage":2,"total":3,"users":[{"id":101,"name":"Ada Lovelace","roles":["admin","editor"],"lastLogin":"2026-11-20T09:12:44Z","settings":{"theme":"dark","emails":true}},{"id":102,"name":"Alan Turing","roles":["viewer"],"lastLogin":null,"settings":{"theme":"light","emails":false}}]}The status bar immediately shows whether the JSON is valid, along with its size, line count and number of values.
Step 2: fix errors if there are any
If the JSON is invalid, the status bar shows the line, column and reason, for example Line 3, column 5: Trailing comma before }, and the line is highlighted in the editor. The Viewer tab offers a Fix in Text button that jumps straight to the problem. The common JSON errors guide explains each message.
Step 3: format or minify
- Format re-indents the document using 2 spaces, 4 spaces or tabs. Formatting is also a quick way to spot structural mistakes, because mismatched nesting becomes obvious.
- Minify (remove white space) does the opposite, producing the smallest possible text, which is useful before pasting JSON into a configuration field or a URL-safe context.
- Copy and Clear work on the whole document.
Step 4: explore the tree
Switch to the Viewer tab. The left side shows a tree; each line has a coloured badge for its type (object, array, string, number, boolean or null). Click an arrow to expand a branch, or click a row to select it and list its contents in the table on the right.
The tree works from the keyboard too: use the up and down arrows to move, right to expand, left to collapse or go to the parent, and Home or End to jump to the first or last row. Expand and Collapse open or close everything at once.
For very large arrays, the viewer shows 500 items at a time with a button to load more, so the page stays responsive even with documents of several megabytes.
Step 5: search and copy paths
Type in the search box to find keys or values; press Enter for the next match and Shift+Enter for the previous one. The tree expands to show each match.
When a node is selected, its path appears above the table, for example $.users[0].settings.theme. Press Path to copy it. This notation, called JSONPath, reads as "from the root ($), take users, then the first item ([0]), then settings, then theme". It maps closely to code: in JavaScript the same value is data.users[0].settings.theme. Value copies the selected value itself, formatted if it's an object or array.
Is it safe to paste JSON into an online tool?
It depends entirely on the tool. Some online viewers send what you paste to their server for processing or storage. Before pasting anything sensitive, check:
- Where is the data processed? The tool's privacy policy should say whether input is uploaded. You can also open your browser's developer tools, switch to the Network tab and watch for requests when you paste.
- Is anything stored? Some tools save your input in the browser or on a server so it's there next time.
- What does the JSON contain? Access tokens, passwords, API keys and personal data shouldn't be pasted into tools you don't control. Replace them with placeholders first.
Handy habits
- Format API responses before comparing them, so a diff tool lines them up.
- Copy the JSONPath of a value straight into a test assertion or a
jqquery. - Keep a small, valid sample of each API response in your project for tests and documentation.