Skip to content
midgeDocs
HAR filesHow to export a HAR file in Chrome
HAR files

How to export a HAR file in Chrome

Export a HAR file in Chrome from the DevTools Network panel, choose between sanitized and full exports, and remove secrets before you share it.

To export a HAR file in Chrome, open DevTools with F12 (or Cmd+Option+I on Mac), click the Network tab, check Preserve log, reproduce the problem, and click Export HAR (sanitized)… in the Network panel’s action bar. Chrome saves a .har file that leaves out Cookie, Set-Cookie and Authorization headers by default.

That default helps, but it does not make the file safe to post anywhere. Tokens in URLs, passwords in request bodies and personal data in responses are still inside. Clean the file with the HAR sanitizer before you share it, and open it in the HAR viewer to check the result. The steps below follow Chrome’s DevTools documentation; labels can shift between Chrome versions, so look for the closest match if something reads slightly differently.

Step 1: Open DevTools on the right page

Go to the page where the problem happens. Then open DevTools in one of these ways:

  • Press F12 or Ctrl+Shift+I on Windows and Linux.
  • Press Cmd+Option+I on Mac.
  • Open the three-dot menu to the right of the address bar and choose More tools, then Developer tools.
  • Right-click the page and choose Inspect.

DevTools opens on the panel you used last. If you are signed in to the app you are debugging, stay signed in: the problem often depends on your account.

Step 2: Open the Network panel and set it up

Click the Network tab. If DevTools is docked in a narrow window, the tab may be hidden in the overflow menu at the end of the tab bar.

Chrome records network requests while DevTools is open. The round record button at the top left of the panel should be red. If it is gray, click it or press Ctrl+E (Cmd+E on Mac) with the panel focused.

Now set two options in the action bar:

  • Preserve log. Check it. Without it, Chrome clears the list on every navigation, and sign-in or checkout flows usually navigate several times.
  • Disable cache. Optional. Check it if the problem might involve stale files, or if the person who asked for the file wants to see a first visit. Leave it off if the bug only happens on repeat visits.

Then click the Clear button (the circle with a line through it) so the file only contains the steps you are about to perform.

Step 3: Reproduce the problem

Reload the page if the problem happens while it loads. Otherwise, perform the exact steps that trigger it: click the button, submit the form, open the dialog. Wait until the error appears, and a second or two longer so slow responses can finish.

While you are here, note what you see. Failed requests usually show in red with a status like 500 or (failed). If you click one and open the Response tab, you often see the error message from the server. That detail is worth copying into your bug report even when you attach the file.

Step 4: Export the HAR file

Chrome offers two ways to save everything in the list:

  1. Click the download icon labeled Export HAR (sanitized)… in the action bar at the top of the Network panel.
  2. Or right-click any request in the table and choose Copy, then Save all as HAR (sanitized).

Pick a folder and file name. A useful name says what and when, such as checkout-500-2026-11-10.har.

If you filtered the list, the right-click menu labels change to Save all listed as HAR (sanitized), and only the visible requests are saved. Clear the filter box and select All in the type filters if you want the complete session.

To put HAR data on the clipboard instead of in a file, the Copy submenu also offers Copy all as HAR (sanitized). A file is easier to attach, so use that unless you have a reason not to.

Sanitized versus “with sensitive data”

The sanitized export leaves out three headers: Cookie, Set-Cookie and Authorization. That removes the most common way a HAR file leaks a session.

Sometimes a support engineer needs those headers, for example when they are investigating a cookie that is not being set or an authentication header that is malformed. Chrome allows a full export, but only after you change a setting:

  1. In DevTools, click the Settings gear.
  2. Go to Preferences and find the Network section.
  3. Check Allow to generate HAR with sensitive data.
  4. Back in the Network panel, click the Export button’s drop-down and choose Export HAR (with sensitive data). The right-click Copy submenu gains matching “with sensitive data” options.

Only send a full export through the support channel that asked for it. Sign out of the app when you are done, which ends the session in most apps, so the cookie in the file stops working. Turn the setting off again afterward so you do not export sensitive data by accident next time.

What a sanitized HAR still contains

Chrome’s sanitizing is narrow by design. These usually remain in the file:

  • Tokens in URLs, such as ?access_token=..., OAuth code parameters or signed download links.
  • Request bodies, including the password field if you signed in while recording, and anything typed into forms.
  • Custom headers like X-API-Key or X-Auth-Token, which are not on Chrome’s list.
  • Response bodies with names, emails, addresses, order data or tokens returned by an API.

The HAR sanitizer checks all of these: auth and cookie headers, any header named like token, secret, key or session, sensitive URL parameters, password, token and card fields in bodies, JWTs, known API key formats and card numbers. It runs in your browser, so the file is never uploaded. It is rule-based, so add your own field names if your app uses unusual ones, and look through the result in the HAR viewer.

Check the file before sending

Open the file again to make sure it has what the recipient needs:

  • In Chrome, click Import HAR in the Network panel’s action bar, or drag the file onto the request table.
  • Or open it in the HAR viewer, which works without DevTools and does not upload the file.

Look for the failing request, its status code and its response. If it is missing, record again with Preserve log on.

Troubleshooting

The file is empty or very small. DevTools was probably opened after the problem happened. Chrome only records while DevTools is open. Open it first, then reproduce.

The failing request is missing. The page navigated and the list was cleared. Check Preserve log and record again.

The file is huge. Clear the list right before reproducing, and avoid leaving the recording running while you browse other pages. Compress the file as a zip before attaching it.

You only need one request. Right-click it and choose Copy, then Copy as cURL or Copy as fetch. The developer can rerun it directly. Keep in mind that this copies the request’s headers as they were sent, which can include cookies and authorization tokens, so check it before pasting it anywhere shared.

For a fuller tour of the Network panel, including throttling and filters, read how to capture network traffic in Chrome.

Skip the export for internal bug reports

When you are reporting a bug to your own team, a HAR file can be more than anyone needs. Midge, a free Chrome extension, records your screen or takes a screenshot and attaches the technical context on one timeline. Every recording includes console logs, network requests, user actions and device info. Passwords, card numbers, tokens and cookies are redacted in your browser before anything leaves your device. For fetch, XHR and WebSocket traffic it keeps bodies and timings; for other files such as images and scripts it keeps status, size and timing, so it is not a full HAR replacement when someone needs every header of every resource.

Official documentation

The browser steps above were checked against these pages on November 10, 2026. Browser menus change between versions, so the official pages are the place to look if a label has moved.

Frequently asked questions

Does Chrome include cookies in a HAR export?

Not by default. Chrome’s standard export is sanitized and leaves out Cookie, Set-Cookie and Authorization headers. A full export is available only after you turn on Allow to generate HAR with sensitive data in the DevTools settings.

Where is the HAR export button in Chrome?

It is the download icon labeled Export HAR (sanitized) in the action bar at the top of the Network panel. You can also right-click any request and use the Copy submenu.

Can I export only some requests?

Yes. Filter the request list first, then right-click and choose Save all listed as HAR (sanitized). For a single request, Copy as cURL or Copy as fetch is often more useful than a HAR file.

Is a sanitized Chrome HAR file safe to share?

Safer, not safe. Tokens in URLs, passwords in request bodies and personal data in responses are still included. Run it through a HAR sanitizer and check the result before sharing.

Can I open a HAR file back in Chrome?

Yes. Click Import HAR in the Network panel action bar or drag the file onto the request table.