How to Read a Minified JSON API Response (5 Methods Compared)

Quick answer

Copy the response and paste it into a browser-based formatter — JSON Dev Tools formats it instantly in your browser with no setup, no signup, and your data never uploaded. For a curl workflow, pipe through jq . or python -m json.tool. If the response came from a browser request, the DevTools Network tab already shows a formatted preview.

API responses arrive minified by default. A response that's perfectly valid JSON is completely unreadable as a single line of thousands of characters. This guide covers the five practical methods for formatting one — no fluff, no "what is JSON" preamble — just which tool to reach for and when. For most developers, a browser-based formatter is the fastest option because it requires no installation, works on any operating system, and formats the response instantly.

Key takeaways

Which method should you use?

SituationBest method
I already have the JSON textBrowser formatter
I'm debugging a request in the browserDevTools Network tab
I'm using curl in the terminaljq .
I can't install new softwarepython3 -m json.tool
I'm already sending the request via PostmanPostman

Method 1 — Browser formatter (fastest, zero setup)

Copy the raw JSON string from wherever you have it — a terminal, a log file, a Slack message — and paste it into the JSON Dev Tools formatter. Click Format. Done.

Why this is the default choice: no app to install, no account to create, works on any OS, and the formatter is client-side so your JSON is never uploaded. If the response contains real customer data or API tokens, this is the only online method that doesn't expose it to a third party. The same tool validates as it formats, so you also see parse errors immediately.

Limitation: you need to have the response text to paste. If the response came from a browser request you can't easily copy, use Method 2 instead.

Method 2 — DevTools Network tab (already in the browser)

If the API request happened inside your browser (a fetch call, an XHR, a page load), the response is already in DevTools and already pretty-printed:

  1. Open DevTools: F12 on Windows/Linux, Cmd+Option+I on macOS.
  2. Go to the Network tab. Refresh the page or trigger the request.
  3. Click the relevant request in the list.
  4. Select the Preview sub-tab — the browser renders the JSON as a collapsible tree.
  5. Select the Response sub-tab to see the raw text you can copy.

Why use this: no copy-paste required; the browser did the work. The tree view lets you navigate deeply nested objects without formatting at all. This is the fastest path when you're already debugging in the browser.

Limitation: only works for requests the browser itself made. Doesn't help with curl output or responses from another machine.

Method 3 — jq (best for curl + terminal workflows)

jq is a command-line JSON processor that pretty-prints by default and can also filter, transform, and query.

# Format a curl response
curl -s https://api.example.com/data | jq .

# Extract a specific field
curl -s https://api.example.com/data | jq '.user.email'

# Format a local JSON file
cat response.json | jq .

Install: brew install jq (macOS), apt install jq (Debian/Ubuntu), or download from jq's official site. Once installed, jq . is the fastest terminal command for reading any JSON.

Limitation: requires installation. If you're on a machine where you can't install packages, use Method 4.

Method 4 — Python one-liner (no install beyond Python)

Python ships with a JSON formatter in its standard library. If Python is available (it's on most developer machines and all macOS/Linux systems), no additional install is needed:

# Pipe curl output through Python
curl -s https://api.example.com/data | python3 -m json.tool

# Format a file
python3 -m json.tool response.json

# On older systems
python -m json.tool response.json

json.tool formats with 4-space indentation by default. To change it: python3 -m json.tool --indent 2 response.json. It also validates — if the JSON is malformed, it prints a clear error instead of silently mangling the output.

Method 5 — Postman (only if you're also sending the request)

Postman automatically pretty-prints JSON responses in its response panel. But Postman's value is in building and sending requests. If you already have the JSON response, opening Postman just to format it adds more steps than it removes.

Use Postman when you're already making the request from Postman. If you just have the response text from somewhere else, reach for any of the other four methods instead.

All five methods compared

MethodSetup neededWorks offlineFilters/queriesSafe for sensitive data
Browser formatterNoneYes (after page load)NoYes (client-side)
DevTools Network tabNone (built in)YesNoYes (local)
jqOne-time installYesYes — powerfulYes (local)
Python json.toolNone (usually pre-installed)YesNoYes (local)
PostmanApp install + accountLimitedYesDepends on sync settings

What about responses that contain sensitive data?

If the response contains personal data, API tokens, or customer records, the safest online option is a client-side formatter that processes the JSON entirely in your browser — like JSON Dev Tools, where the response is never uploaded to a server. For a full explanation of how to verify whether any tool is genuinely client-side, see is it safe to paste JSON into an online formatter?

Frequently Asked Questions

What is the fastest way to read a minified JSON response?

For most developers, a browser-based formatter is the fastest option because it requires no installation, works on any operating system, and formats the response instantly. Copy the minified JSON, paste it into the JSON Dev Tools formatter, and click Format — the entire process takes under five seconds.

How do I view JSON from curl in a readable format?

Pipe the curl output through jq: curl -s https://api.example.com/data | jq . — jq pretty-prints and syntax-highlights the response in the terminal. If jq is not installed, use Python instead: curl -s https://api.example.com/data | python3 -m json.tool — Python's json.tool module is in the standard library and requires no additional installation.

How do I pretty-print JSON without Postman?

If you already have the JSON response, opening Postman just to format it adds more steps than it removes. Paste the response into a browser-based formatter like JSON Dev Tools — no app, no signup, no account. For terminal workflows, pipe through jq or Python's json.tool module instead.

Can I format JSON without installing jq?

Yes, two ways. First, Python's built-in json.tool: curl -s https://api.example.com/data | python3 -m json.tool — Python ships on macOS and most Linux systems so no install is needed. Second, paste the JSON into a browser-based formatter like JSON Dev Tools — works on any OS with no installations at all.

Is it safe to paste an API response into an online formatter?

It depends on whether the formatter is client-side or server-based. A server-based formatter uploads your response to a third-party backend where it can be logged. The safest online option is a client-side formatter that processes the JSON entirely in your browser — like JSON Dev Tools, where your data never leaves your device. See the full guide on whether it is safe to paste JSON online for how to verify any tool.

How do I format JSON in the browser DevTools Network tab?

Open DevTools (F12), go to the Network tab, and click on the request. Select the Preview sub-tab — the browser automatically pretty-prints JSON there as a collapsible tree. The Response sub-tab shows the raw text you can copy. This only works for requests the browser itself made, not for curl output.

Format a JSON response now — paste and go

No setup, no signup. Paste your response, click Format, read it. Your JSON never leaves your browser.

Open JSON Formatter JSON Validator Is it safe to paste JSON?
About the author

Pasindu Ishan is a software developer based in Sri Lanka. He builds privacy-first developer tools at JSON Dev Tools.