How to generate a HAR file in any browser
A HAR file is the receipt support teams ask for when a bug only happens on your machine. It records every request your browser made — URLs, headers, cookies, timings, response bodies — so someone else can see exactly what happened. Generating one takes under a minute once you know where the button hides.
Two things matter before you start: open DevTools before reproducing the problem (anything that happened earlier is gone for good), and turn on log preservation so the recording survives page navigations.
Chrome and Edge
Open DevTools with F12 (or Ctrl+Shift+I / Cmd+Option+I) and switch to the Network tab. Tick Preserve log at the top of the panel, and tick Disable cache if you're chasing a stale-content bug. Now reproduce the problem — click through the broken flow while the requests pile up in the list.
Once the bug has happened, right-click anywhere in the request list and choose Save all as HAR with content. The "with content" part matters: without it, response bodies are missing and half the diagnostic value goes with them. Chrome names the file after the host, something like app.example.com.har.
Firefox
Firefox hides the same feature behind a different label. Open the Network Monitor with Ctrl+Shift+E / Cmd+Option+E, reproduce the issue, then click the gear icon in the panel's top-right corner and choose Save All As HAR. Firefox always includes response bodies, so there's no with-content toggle to forget.
The equivalent of Chrome's preserve-log is Persist Logs, found under that same gear menu — enable it before any step that navigates, or the recording wipes itself mid-reproduction.
Safari
Enable the Develop menu first (Settings → Advanced → Show features for web developers), then open Develop → Show Web Inspector and pick the Network tab. Reproduce the problem, then click Export near the top-right of the Network panel — Safari writes a .har file directly. The Export button only appears once at least one request has been recorded, so if it's missing, reload the page with the inspector open.
Keep it short, keep it clean
A HAR of a two-minute clicking spree is miserable to read. Open the Network tab, reproduce the *one* failing action, export, done — twenty requests beat two hundred. And if the file is headed to support or a public issue tracker, sanitize it first: a raw capture carries live session cookies and tokens. Our guide to HAR file security covers exactly what leaks, and the viewer has a one-click sanitizer built in.
Prefer the terminal? Playwright records HAR natively via recordHar on the browser context, and Puppeteer pairs with chrome-har-capturer. Chrome's own --log-net-log flag writes a NetLog instead — a different format that needs conversion before any HAR tool will read it.
HAR Viewer
Inspect the file you just captured — requests, timings, failure flags, secret scan
Frequently asked questions
Why is my HAR file empty or missing the failing request?
The request happened before DevTools opened, or a navigation wiped the log. Open the Network tab first, enable Preserve log (Chrome) or Persist Logs (Firefox), then reproduce the problem again.
What does "with content" mean when saving a HAR?
It includes response bodies — the actual HTML, JSON and images the server returned. Without content you get URLs, headers and timings only, which is rarely enough to debug a broken API response.
Can I capture a HAR from the command line?
Yes. Playwright records HAR files natively through its recordHar context option, and Puppeteer plus chrome-har-capturer does the same for Chrome. Chrome's --log-net-log flag produces a NetLog, which is a different format entirely.
How big is too big for a HAR file?
Try to keep captures under ~50 MB. Browsers happily write multi-hundred-megabyte files, but viewers parse the whole thing as JSON, so huge files crawl. Record just the failing action instead of an entire session.