How to Read a JSON Response Without Leaking Every Request
An API response can carry tokens, emails and internal hostnames. Here is how to read and format one inside the browser, without handing the whole document to a formatter website.
A JSON response is often the most sensitive page you load all day. One API call can return an access token, a customer’s email address, an internal hostname and a database id, all of it in plain text. The response is also too long to read, so you paste it into whichever formatter ranks first and read it there.
The paste is the leak. A formatter that runs on its own server receives the whole document, secrets included. The tool does not have to be dishonest for that to matter, because the bytes still left your machine, and they are now in someone else’s request log.
None of this needs a website. The browser in front of you can display a JSON response, and a local viewer can query, edit and export it with nothing going out.
What you need
- A response you are allowed to look at: an API URL, a
.jsonfile, or JSON buried inside a page. - A browser with DevTools. Firefox documents its own JSON viewer, and Chrome’s Network reference covers the Response tab used below.
- Optional: Best JSON Viewer, the extension built by BestWebExtension. Free for personal use, and useful here when you want tables, queries or editing.
1. Work out whether the formatter is a page or an app
Two formatter sites look identical and behave nothing alike. One runs a few kilobytes of JavaScript in the tab and never sends your document anywhere. The other posts it to a backend, formats it there and streams the result back.
The difference is testable in about a minute.
- Open the formatter and let it load fully.
- Open DevTools, go to the Network panel, and switch throttling to Offline.
- Paste a JSON document and format it.
If the result appears, the page did the work locally. If the request hangs or the UI stalls, the document was going to a server. Keep the panel open while you test, because the request that just appeared there is the one carrying your payload.
The test is not the whole answer, since a page can format locally and still send a copy somewhere. Read the tool’s own privacy note and its data-use disclosure next. A line about documents being processed on their servers is the honest version of the same warning.
2. Read the response in the tab you already have
Anything served with Content-Type: application/json is already viewable without a third party. Firefox documents the behaviour: open a JSON file, or view a remote URL served as application/json, and the document is parsed and given syntax highlighting, with arrays and objects collapsed so you expand only what you need.
In other browsers the response opens as a page whose text is the raw JSON. That view is plain, and for a 400 line payload it is enough. For a 40,000 line one you want a tree, and that is a job for the next two steps rather than a paste site.
3. Copy the body out of DevTools instead
When you need the exact bytes rather than the rendered view, DevTools hands them over without an intermediary:
- Open DevTools and select the Network panel.
- Reload the page so the request is recorded.
- Select the request by name in the requests table.
- Open the Response tab to read the body.
- Right-click the request, open Copy, and choose Copy response to put the body on your clipboard.
Steps 3 to 5 come from Chrome’s Network features reference, which documents the Response tab and the Copy response item. Nothing in this path leaves your machine: the bytes travel from the origin you called, through your own browser, into your clipboard.
4. Format and query it where it already lives
The reason people paste into a website is that the built-in view does not do enough. A viewer that runs in the tab closes that gap without the upload.
Best JSON Viewer has two activation modes, and manual is the default:
- Manual: click the extension icon, or right-click the page and choose View in JSON Viewer. Nothing runs until you ask it to.
- Auto: enable auto-detection in the extension settings and grant the optional
<all_urls>permission. Pages served asapplication/jsonthen open formatted on their own.
Either mode gives you a toolbar over the page: a view switcher for Tree, Raw, Table, Visualize and Edit, an input for JSONata expressions, a theme toggle, and Copy / Export. The features page describes the five views and the permission table, and states plainly that there is no telemetry, no tracking, and no data leaving the browser.
Auto mode is the part to think about. It is the setting that makes the viewer feel invisible, and it asks for a host permission that covers every site you visit. The docs are clear that the permission is requested at runtime rather than at install time, so it stays off until you switch it on. Leave it off if you read a handful of responses a day.
5. Check the viewer itself with the same care
A viewer sees every payload you open in it, so the extension’s own permissions deserve the reading you would give the paste site.
The documented list is short: storage, contextMenus, scripting, activeTab and tabs are install-time, and each has a stated purpose such as persisting your theme or reading the tab URL for a suggested filename. The broad one, <all_urls>, is runtime only and belongs to auto mode. A sensitive permission that stays optional is the shape you want, because the default install cannot read pages you did not point it at.
The extension is also open source, with the code at github.com/purplecandy/bestwebextension, so the claims above can be checked instead of trusted. If you want the longer version of this routine, the guide to checking what an extension can access walks through the permission list and the warning strings.
One habit worth keeping: extensions update themselves, so a permission review is something you repeat when a tool changes.
6. Keep files on your machine
A response saved as a file does not need a browser at all.
Python ships a validator and pretty-printer, documented in the json module reference:
python3 -m json.tool response.json
The docs also note that from version 3.14 the module can be invoked directly as python3 -m json, and that the json.tool form remains supported. Add --sort-keys when you want the output stable enough to diff.
If jq is on the machine, it queries as well as formats, and its manual documents both:
jq '.users[0].email' response.json
Both read the file where it sits.
When it won’t help
- The response is not JSON. An HTML error page saved with a
.jsonname, or a truncated body, gives a viewer nothing to parse. Check the Raw view first. - You need the whole exchange. Request headers, timings, redirects and the payload you sent belong in the DevTools Network panel. No formatter shows them.
- The document has to leave your machine. Sending it to a colleague, a ticket or an AI assistant is a deliberate share. A local viewer cannot make that safe, and pretending otherwise is worse than the paste.
- The recipient is a shared or proxied network. Keeping the payload out of third-party sites is a real gain, and it does not encrypt the connection or stop a proxy from logging the response on the way to you.
- The JSON is enormous. A viewer with virtualised rendering handles a big array, while a page that renders every row will not. If the browser itself is struggling, format it as a file on disk.
Takeaways
- A cloud formatter receives the whole response, so the habit matters more than the tool’s intentions.
- You can test whether a formatter is local: load it, go offline, then paste.
- Firefox parses JSON responses natively, and any browser lets you read and copy the body from the DevTools Network panel.
- A local viewer such as Best JSON Viewer adds queries, tables and editing without sending the document anywhere, and its broad host permission stays optional until you enable auto mode.
- Files on disk can be checked with
python3 -m json.toolorjq, with no browser involved.
For the queries themselves, how to query JSON with JSONata in the browser works through the expressions that pull one field out of a large response, and the large payload comparison covers which viewers stay usable when the document runs to megabytes.
Questions
Is it safe to paste JSON into an online formatter?
Only when the page does the formatting inside your browser. If the formatter runs on a server, the whole document arrives there, and API responses often carry access tokens, email addresses or internal hostnames.
Do I need a browser extension to read a JSON response?
No. Firefox has a JSON viewer built in, and in any browser you can read the response body in DevTools and copy it from the request menu. An extension earns its place when you want a table view, a query language or editing.
How do I know whether a tool formats JSON locally?
Load the tool, disconnect the network, then paste a document. If it still formats, the work happened on your machine. If it stalls, the document was on its way to a server.
Read next
- How to Check a Chrome Extension's PermissionsA permission list is the only proof you get before installing. Read the install prompt, the store's privacy tab and the details page, and know what they still miss.
- How to Query JSON With JSONata in the BrowserPull one field out of a large API response without scrolling it: what JSONata is for, the expressions that do the work, and where to run them in a browser.
Best Chrome Extensions for Web Developers: 2026Five Chrome extensions that cover everyday dev work: reading API responses, debugging React, testing cookies, and profiling any site's stack. Checked at each store page in October 2026.