← Back to Blog DevTools

HAR Files Explained: Debug Network Traffic & Redact Sensitive Data (2026)

Have a HAR file to inspect or share?

Our HAR File Analyzer & Redactor opens it entirely in your browser: request table, waterfall timeline, status breakdown — plus one-click redaction of tokens, cookies, and bodies before you share it. Nothing is uploaded.

When a page is slow or an API call fails, the fastest way to show someone exactly what happened is a HAR file — a complete recording of every request your browser made. It is also one of the most quietly dangerous files a user can attach to a support ticket, because it contains your session cookies, API tokens, and sometimes passwords. This guide covers both sides: how to use HAR files to debug anything, and how to strip them clean before anyone else sees them.

1. What Is a HAR File?

HAR stands for HTTP Archive. It is a standardized JSON format that records every HTTP transaction a browser performed while recording was on: the URL, method, status code, all request and response headers, timings broken down by phase, sizes, and — if content capture was enabled — the full bodies. Because the format is standardized, a capture from Chrome opens perfectly in Firefox's DevTools, in analysis tools, and in your teammate's editor.

Support engineers at CDNs, hosting companies, and API providers routinely ask for HAR files because a single file answers the questions a screenshot cannot: Was it a 403 or a 500? Which request was slow? Did the browser even attempt the call? What cache headers came back?

2. Capturing One in Every Browser

The workflow is identical in spirit everywhere: open the network panel, start recording, reproduce the problem, stop, export.

  • Chrome / Edge: DevTools (F12) → Network tab → check "Disable cache" → reproduce the issue → right-click any request → "Save all as HAR with content", or use the export (↓) icon.
  • Firefox: DevTools → Network tab → reproduce → gear icon → "Save All As HAR", or right-click → Save All As HAR.
  • Safari: First enable the Develop menu (Settings → Advanced), then Develop → Show Web Inspector → Network tab → Export button in the top-right.

Two capture rules make HAR files actually useful. First, start recording before the failing action — a capture that begins after the bug occurred misses the failing request. Second, keep the capture scoped: clear the network log, reproduce only the problem once, then export. A 10,000-entry capture buries the signal and makes redaction harder.

3. What's Inside: The JSON Structure

A HAR file is one JSON object with a log root. The parts you will actually use:

{
  "log": {
    "version": "1.2",
    "creator": { "name": "Chrome", "version": "126" },
    "entries": [
      {
        "startedDateTime": "2026-08-26T10:14:03.221Z",
        "time": 342.19,
        "request":  { "method": "POST", "url": "https://api.example.com/login",
                      "headers": [ { "name": "Authorization", "value": "Bearer ey..." } ],
                      "postData": { "text": "{\"user\":\"ana\"}" } },
        "response": { "status": 401,
                      "headers": [ { "name": "Set-Cookie", "value": "session=..." } ],
                      "content":  { "text": "{\"error\":\"bad credentials\"}" } }
      }
    ]
  }
}

Each entry is one request. time is total duration in milliseconds; inside timings you also get the phase breakdown (DNS, connect, TLS, wait, receive). Note how much sensitive surface is visible in this one example: an Authorization header, a session cookie, and a request body containing a username. That is one login attempt. Now imagine a capture of a whole dashboard session.

4. Reading the Waterfall Timeline

The fastest diagnosis technique is reading the waterfall — the horizontal bars showing when each request ran and where its time went:

  • Long DNS or connect bars — resolver or network problems, not your app.
  • Long TLS bars — certificate or handshake issues, often with new domains or misconfigured CDNs.
  • Long "waiting" (TTFB) bars — the server took the time. This is where backend profiling starts.
  • Long download bars on small files — bandwidth or throttling; check response sizes.
  • Requests starting late in a chain — blocked on another request; look for the dependency that delayed them.

Sort by "time" descending and the top five rows usually tell the whole story. Sort by status and group the 4xx/5xx rows to find the actual failures inside an otherwise-green capture.

5. The Danger: What HAR Files Leak

Here is the part most users never hear: a HAR file is a credential dump waiting to be attached to a ticket. Depending on the session, it routinely contains:

  • Authorization headers — Bearer tokens, API keys, JWTs that grant live access until they expire.
  • Cookie headers — session cookies that can hijack a login without a password.
  • Set-Cookie responses — the same session material from the server side.
  • Request bodies — passwords typed into login forms, personal data in API payloads.
  • Response bodies — other users' data if you were testing admin views, plus internal API shapes attackers love.

Security teams treat unredacted HAR files the way they treat password dumps, because functionally they are one. The attack is not hypothetical: anyone holding your session cookie can typically impersonate you to the application without ever needing your password.

6. Redaction: What to Strip Before Sharing

Before a HAR file leaves your machine, strip at minimum:

  1. Authorization headers (request side) — Bearer tokens, Basic auth, API keys in custom headers like X-Api-Key.
  2. Cookie and Set-Cookie headers — both directions.
  3. All request and response bodies — unless the bug is literally in a body, sizes and statuses usually suffice for diagnosis.
  4. Custom auth headers specific to your stackX-Auth-Token, X-CSRF-Token, anything that looks like a credential.

Manual redaction (opening the JSON in an editor and deleting) works but is error-prone at scale — one missed header in entry 4,000 of 4,000 is enough. A redaction tool that processes the file structurally is faster and safer. Our HAR File Analyzer & Redactor does this locally: it strips the credential header families, removes bodies on request, and hands you a clean download — and because it runs in the browser, the sensitive original never leaves your device in the first place. That last property matters more than it sounds; uploading an unredacted HAR to a random web tool just moves the leak.

7. The Safe Support-Ticket Workflow

  1. Reproduce cleanly: clear the network log, trigger the bug once, stop recording.
  2. Analyze first yourself: open the file in a local analyzer — often you will spot the failing status or slow request and solve it without any ticket.
  3. Redact: strip auth headers, cookies, and bodies. Keep URLs, statuses, timings, and cache headers — that is what support actually needs.
  4. Sanity-check the export: search the redacted file for Authorization, token, and cookie. Zero hits means it is safe.
  5. Attach with context: timestamp of the failing action, expected vs actual behavior. Support resolves scoped, redacted captures in a fraction of the back-and-forth.

The same discipline applies to related artifacts: environment files and log files carry credentials too — see why you should never upload .env files online, and for stripping credentials from server logs, the Log File Anonymizer applies the same local-first redaction idea to log streams. To scan any snippet for accidentally included credentials before it leaves your machine, the Secret Scanner detects key patterns client-side.

Conclusion

HAR files are the most complete debugging artifact a browser can produce — and, unredacted, one of the most dangerous files you can share. Capture scoped, read the waterfall, strip the credentials, and you get all of the diagnostic power with none of the exposure. The pattern to remember: analyze locally, redact structurally, share deliberately.

Frequently Asked Questions

What is a HAR file?
A HAR (HTTP Archive) file is a JSON log recording every network request and response a browser made while recording: URLs, headers, timings, sizes, and status codes. Support teams and developers use it to debug slow pages and failed requests.
How do I capture a HAR file in Chrome?
Open DevTools, go to the Network tab, check Disable cache, reproduce the problem, then right-click any request and choose Save all as HAR with content, or use the export arrow icon.
Are HAR files safe to share?
Not without redaction. HAR files capture Authorization headers, cookies, API keys, and sometimes full request and response bodies. Sharing an unredacted HAR can leak live session credentials.
What sensitive data does a HAR file contain?
Commonly: Authorization and Cookie headers, Set-Cookie responses, API keys in custom headers, CSRF tokens, and full payloads if content capture was enabled. Anything your browser sent or received is in the file.
How do I redact a HAR file before sharing?
Use a client-side HAR redactor that strips Authorization, Cookie, and Set-Cookie headers plus custom headers you name, and optionally removes all bodies. Browser-based tools do this locally so the file never leaves your machine.
How do I open and read a HAR file?
Drag it back into the Network tab of browser DevTools, or use a browser-based HAR analyzer that shows a request table with statuses, sizes, and a waterfall timeline without uploading the file anywhere.
What is the waterfall timeline?
A bar per request showing when it started relative to page load and how long DNS, connection, TLS, waiting, and download took. Long waiting bars point at slow servers; long DNS bars at resolver problems.
Do HAR files work across browsers?
Yes. HAR is a standardized JSON format, so a capture from Chrome, Firefox, Safari, or Edge opens in any tool that reads the format.