BugMojoBugMojoBugMojo
FeaturesPricingBlogGuidesAbout
Log inGet started
BugMojoBugMojo

Bug reports that actually help fix bugs — capture, replay, share.

A product of Softech Infra.

Product

  • Features
  • Pricing
  • Get started
  • Log in

Resources

  • Blog
  • Guides
  • Compare
  • Glossary

Company

  • About
  • Contact
  • Privacy
  • Sitemap
  • Engineering
  • Playbooks
© 2026 BugMojo. All rights reserved.
AllGuidesEngineeringPlaybooksCompareGlossaryAlternativesBy roleBug tracking by framework
  1. Home
  2. Blog
  3. Glossary
  4. What Is a HAR File? How to Capture, Read, and Share One Safely
Glossary

What Is a HAR File? How to Capture, Read, and Share One Safely

A HAR file is a JSON log of a browser session's network activity. Here is what it captures, how to read one, and why a single unsanitized export can leak live session tokens.

Hrishikesh BaidyaHrishikesh Baidya·Jun 5, 2026·6 min read
Glossary
An isometric JSON log document fanning into network-entry cards with the Cookie, Set-Cookie, and Authorization header rows clipped away at a lime redaction line as clean data flows toward an agent node
TL;DR
  • A HAR file (HTTP Archive) is a JSON log of a browser session's network activity: every request, every response, with headers, bodies, and timing.
  • The format is a single log object holding version, creator, browser, pages, and an entries array — one entry per request/response pair.
  • It is a credential, not a log: a raw export can carry the Cookie, Set-Cookie, and Authorization headers, so a live session token travels with the file.
  • Chrome's sanitized export strips those three headers; an unsanitized export does not. The 2023 Okta breach hijacked sessions straight out of uploaded HARs.

Definition

A HAR (HTTP Archive) file is a JSON document that records a browser's network activity for a session. A single log object holds the browser, the pages, and an entries array, where each entry captures one request and response with its headers, cookies, body, and timing.

The current de facto format is version 1.2. Its root is one log object with five members — version, creator, browser, pages, and entries — as set out in the HAR 1.2 specification. Each item in entries is one round trip: a full request/response pair carrying the method and URL, the request and response headers, the cookies, the query string, the postData body, the response content, and a timings block that splits the request into DNS, connect, TLS, send, wait, and receive phases. It is, in effect, a saved copy of the DevTools Network panel for a session.

Why it matters

A HAR is the most portable way to reproduce a network bug you cannot see. Because it freezes every request, status code, payload, and timing from the user's session, an engineer can replay the failure without remote access or a matching environment. That is also exactly what makes it dangerous. The same capture that records a failed POST /api/checkout also records the headers that authorized it — and those headers are not metadata, they are keys.

Concretely, a raw HAR can contain the Cookie and Set-Cookie headers (the session cookie itself), the Authorization header (a bearer/JWT token or Basic credentials), API keys passed in URL query strings, and any personal data typed into a form body. A live session cookie inside a shared HAR is functionally a password: anyone who replays it is signed in as the user. This is not theoretical. Cloudflare documented that the October 2023 Okta support-system breach was carried out by stealing uploaded HAR files and lifting the session tokens of administrators at Cloudflare and other organizations directly out of them. The support workflow — 'send us a HAR' — was the attack vector.

Browsers know this, which is why Chrome DevTools changed its default. Per the Network features reference, DevTools now exports a sanitized HAR that excludes the Cookie, Set-Cookie, and Authorization headers; pulling those back in is a separate, explicit 'Save all as HAR (with sensitive data)' action gated behind a settings toggle. The catch is twofold. First, the safe behavior is only the default — one wrong menu choice re-includes every secret. Second, sanitization is header-scoped: it strips three named headers, but it does not promise to remove a token embedded in a URL, a credential in a POST body, or a custom header like X-Api-Key. Firefox is blunter still. Its Network Monitor offers 'Save All as HAR', 'Copy All as HAR', and 'Import HAR' — none of which redact by default, so a single 'Copy All as HAR' can drop live cookies onto the clipboard.

Treat a HAR like a credential
  1. Prefer Chrome's sanitized export; it removes Cookie, Set-Cookie, and Authorization.
  2. Sanitized is not clean: scan the JSON for tokens in URLs, postData, and custom headers (X-Api-Key, X-Auth-Token).
  3. In Firefox, assume nothing is redacted — 'Save/Copy All as HAR' carry live secrets.
  4. Never paste a raw HAR into a public ticket, chat, or an unknown online viewer.
An isometric JSON log object fanning open into stacked request/response entry cards; three header rows labeled Cookie, Set-Cookie, and Authorization are being clipped at a lime redaction line while the cleaned entries flow onward toward a small agent and terminal node
One log, many entries. Each entry holds a request/response pair with headers, body, and timings. The sanitized export clips the Cookie, Set-Cookie, and Authorization rows; everything else still travels.

The industry is now hardening the workflow rather than trusting it. As of 25 March 2026, Cloudflare ships an 'Unsanitized HAR' DLP profile that inspects HAR uploads for session cookies, authorization headers, and other credentials, then blocks the upload or redirects the user to a sanitizer that writes a tamper-evident 'sanitized' marker. When a major network provider builds data-loss-prevention specifically to catch leaking HARs, the lesson is clear: the safe-by-default design has to move earlier, to the moment of capture, not the moment of upload.

How this shows up in a real BugMojo bug report

Every top-ranking HAR explainer treats safety as an after-the-fact step: export the sanitized HAR, then double-check it before you send. That ordering is the whole problem. It captures everything first and asks a human to remember to scrub second — and the Okta incident is what happens when the human forgets. The fix is to invert the order so the sensitive data never enters the artifact in the first place.

That is the wedge BugMojo is built on. Instead of dumping the full wire and hoping someone redacts it, the browser extension makes capture decide what to retain, and PII/secret redaction runs client-side, before any data leaves the browser. Sensitive headers and form values are stripped at the source, not scrubbed from a file after the fact. The result is closer to the requests you actually need — the failing POST, its status, its timing — minus the session cookie that turns a bug report into a breach. The retained network context is then attached to the bug alongside an rrweb session replay and the console output, so the report is a reproduction, not a credential-laden JSON dump.

The second half is who reads it. Because the captured context is structured, pre-sanitized fields rather than a screenshot or a raw .har, the BugMojo MCP server can hand it to an AI agent — Claude Code, Cursor — as data. The agent correlates the failed request with the replay frame and the console error and reasons about cause, without a human ever opening a HAR or risking a token in a chat window. A HAR is the right idea (freeze the network at the failure); doing it safely means deciding at capture time and making the result agent-readable.

FeatureCapabilityBugMojo captureRaw / sanitized HAR export
Secrets removed before data leaves the browser—✓After-the-fact
Strips Cookie / Set-Cookie / Authorization headers—✓Only if sanitized
Network context bundled with rrweb replay + console—✓—
Captured context handed to an AI agent over MCP—✓—
Complete, unfiltered record of every request on the wire—Retained subset✓
Universally importable into Chrome/Firefox DevTools——✓
Two-sided: BugMojo redacts at capture and ships the context over MCP, but a raw HAR still records the entire wire.
Key takeaway

A HAR file is a JSON recording of a session's network traffic — one log object, an entries array of request/response pairs — and it should be handled like a credential, because a raw export carries the Cookie, Set-Cookie, and Authorization headers. Chrome's sanitized export strips those three; it does not strip tokens in URLs or bodies. The durable fix is to decide what to retain at capture time and redact before the data ever leaves the browser.

Capture the network context, not the credentials

BugMojo redacts PII and secrets client-side before data leaves the browser, keeps the requests around the failure next to an rrweb replay and console, then hands the bundle to Claude Code or Cursor over MCP — so triage reads structured context, never a credential-laden HAR.

Install the extension

Frequently asked questions

Frequently asked questions

Sources

  1. Network features reference — Chrome DevTools exports a 'sanitized' HAR by default that excludes the Cookie, Set-Cookie, and Authorization headers; exporting with sensitive data is a separate explicit action — Chrome for Developers (Google) (2024)
  2. HAR 1.2 specification — the root log object and its members (version, creator, browser, pages, entries); each entry's request/response, headers, cookies, queryString, postData, content, timings — HAR Spec (ahmadnassri/har-spec, canonical 1.2 mirror) (2024)
  3. Introducing HAR Sanitizer: secure HAR sharing — the October 2023 Okta support breach stole HAR files containing live session tokens used to hijack admin sessions at Cloudflare and others — Cloudflare (2023)
  4. Detect and sanitize HAR files — Cloudflare's 'Unsanitized HAR' DLP profile detects HAR uploads carrying session cookies and authorization headers and can block or redirect them to a sanitizer — Cloudflare Docs (Changelog) (2026-03-25)
  5. Network Monitor toolbar — Firefox exposes 'Save All as HAR', 'Copy All as HAR', and 'Import HAR'; none redact by default, so a clipboard copy can carry live cookies and tokens — Mozilla (Firefox Source Docs) (2025)
Share:
Hrishikesh Baidya
Hrishikesh Baidya· Chief Technology Officer

Hrishikesh Baidya is the CTO at Softech Infra. He is drawn to architecture that is invisible — systems that simply work — and leads the engineering behind BugMojo.

On this page

  • Definition
  • Why it matters
  • How this shows up in a real BugMojo bug report

Get bug-tracking insights, weekly.

Engineering deep-dives, QA playbooks, and honest tool comparisons. No spam — unsubscribe in one click.