What is HAR file? How to Generate or Open HAR Files?

A HAR file (HTTP Archive) is a JSON log of every network request a browser made while a page loaded, and you generate one from the Network panel of Chrome, Edge or Firefox developer tools.

This guide covers what a HAR file contains, how to capture one in each browser for a support ticket, how to open and read it, and how to keep passwords and cookies out of it.

What is HAR file? How to Generate or Open HAR Files?
The Network panel lists every request with its status, type, size and time, which is the data a HAR file stores. (Image: developer.chrome.com)

How do I generate a HAR file for troubleshooting browser issues?

These steps work in Google Chrome and Microsoft Edge on Windows and Mac. Close other tabs first so the log only holds the problem page.

  1. Open the page that has the problem.
  2. Right-click anywhere on the page and select Inspect, or press F12.
  3. Select the Network tab in the developer tools panel.
  4. Tick Preserve log so the log is not cleared when the page reloads or redirects.
  5. Reload the page and repeat the action that fails, then wait a few seconds after the error appears.
  6. Select the Export HAR (sanitized) button in the action bar at the top of the Network panel.
  7. Give the file a descriptive name, save it, and attach the .har file to your support ticket.
Generate a HAR file by right-clicking the page and selecting Inspect
Pressing F12 opens the same developer tools, where the Network tab records the requests for the HAR export. (Image: developer.chrome.com)

What is a HAR file?

HAR stands for HTTP Archive. Browser developer tools and other HTTP session tools use it to export captured network traffic, and the file itself is a JSON object with a fixed set of fields.

Question Answer
HAR file full form HTTP Archive
File extension .har
Format Plain-text JSON, readable in any text editor
What it records Each request's URL, method, status code, request and response headers, timing and, in a full export, cookies and authorization headers
Who asks for it Website, SaaS and ad-platform support teams who need to see why a page fails to load, sign-in loops, or requests time out
What creates it The Network panel in Chrome, Edge and Firefox developer tools
What opens it Browser developer tools, Google's HAR Analyzer, or a text editor

Generate HAR file on Google Chrome browser

Chrome exports a sanitized HAR by default, which leaves out the Cookie, Set-Cookie and Authorization headers.

  1. Press Ctrl + Shift + I on Windows or Cmd + Option + I on a Mac to open Chrome DevTools.
  2. Select the Network panel.
  3. Tick Preserve log, and tick Disable cache if the problem only happens on a first visit.
  4. Reload the page and reproduce the problem.
  5. Right-click any request in the Requests table and select Save all as HAR (sanitized), or select Export HAR (sanitized) in the action bar.
  6. Choose a folder and save the .har file.

Press Ctrl + E (Windows) or Cmd + E (Mac) with the Network panel focused to stop recording once the problem has been captured.

Generate HAR file in Chrome from the Requests table Copy menu
The sanitized export leaves out Cookie, Set-Cookie and Authorization headers, so it is the safer file to send. (Image: developer.chrome.com)

Export HAR file from Microsoft Edge

Edge uses the same DevTools engine as Chrome, the tools you also use to troubleshoot JavaScript errors in Edge. Its export includes every request since DevTools opened; you cannot filter the export or save a single request.

  1. Open the page in Edge, right-click it and select Inspect.
  2. Select the Network tool and tick Preserve log.
  3. Refresh the page and reproduce the problem.
  4. Select the Export HAR (sanitized) button in the action bar at the top of the Network tool.
  5. Save the file, or right-click a request and select Copy > Copy all as HAR (sanitized) to paste the log into a ticket instead.
Export HAR file from Microsoft Edge with Preserve log ticked
Keep Preserve log on so redirects and reloads do not clear requests before you export them. (Image: Microsoft)

How to generate HAR file on Firefox?

Firefox calls its Network panel the Network Monitor. It clears the log on every page load unless Persist Logs is on.

  1. Press Ctrl + Shift + E on Windows or Linux, or Cmd + Opt + E on a Mac, to open the Network Monitor.
  2. Open the menu of other actions on the Network Monitor toolbar and turn on Persist Logs.
  3. Reload the page and reproduce the problem.
  4. Open the same menu and select Save All as HAR.
  5. Choose a folder in the file dialog and save the .har file.

Copy All as HAR in the same menu puts the log on the clipboard in HAR format instead of saving a file.

Generate HAR file on Firefox from the Network Monitor action menu
The gear menu on the right holds Persist Logs, Save All As HAR, Copy All As HAR and Import HAR File. (Image: Mozilla)

How to open HAR files?

Importing a HAR file into DevTools shows the requests exactly as they looked in the browser that captured them, with timings and initiators.

  1. Open Chrome or Edge and press F12 to open DevTools on any tab.
  2. Select the Network panel.
  3. Drag the .har file onto the Requests table, or select the Import HAR button in the action bar.
  4. Select a request to see its headers, response and timing.
  5. In Firefox, open the Network Monitor, then select Import HAR from the menu of other actions.
Open HAR files by importing them into the DevTools Network tool
Click the Import HAR file button in the action bar, or drag the file onto the Requests table. (Image: Microsoft)

What software is used to view HAR files?

Your situation Use this Why
You want to replay requests with timings Chrome or Edge DevTools Import HAR Shows the waterfall, headers and initiators like a live capture
You use Firefox Firefox Network Monitor Import HAR Built in, no extra software
You need a HAR file analyzer that flags errors Google HAR Analyzer at toolbox.googleapps.com Reads the file in the browser with no DevTools knowledge needed; Microsoft's Edge DevTools docs point to it
You only need to search for a URL or error text Notepad, VS Code or another text editor A HAR file is plain JSON, so Find works on it
You want to remove a header before sharing A text editor Delete the value in the JSON and save the file

Is it safe to share a HAR file?

A full HAR export can contain session cookies and authorization tokens, which let someone act as you on that site until the session expires.

Share the sanitized export unless the support team specifically asks for sensitive data, and send it only through the vendor's own ticket system. Chrome and Edge only offer Export HAR (with sensitive data) after you tick Allow to generate HAR with sensitive data under Settings > Preferences > Network, so the default file already strips the Cookie, Set-Cookie and Authorization headers.

Firefox's Save All as HAR writes the full log, so sign out of the site after you share it to end the captured session.

Share a HAR file safely by exporting the sanitized version
By default DevTools exports a sanitized log without Cookie, Set-Cookie and Authorization headers that could expose your session. (Image: Microsoft)

Check the HAR file captured the problem

  1. Import the saved file back into the DevTools Network panel.
  2. Confirm the request list starts before the failing action and includes the page that showed the error.
  3. Look for requests with a red status, such as 4xx or 5xx codes, or a failed status.
  4. Open the file in a text editor and search for the page URL to confirm the request is in the log.
  5. If the list is empty or stops early, capture again with Preserve log or Persist Logs turned on.

HAR file problems and fixes

The HAR file is empty or missing the failed request

DevTools only records while it is open, and the log clears on reload without Preserve log.

  1. Open DevTools before you load the page.
  2. Tick Preserve log in Chrome or Edge, or turn on Persist Logs in Firefox.
  3. Reproduce the problem and export again.

Export HAR (with sensitive data) is missing

Chrome and Edge hide the full export until a setting allows it.

  1. Open DevTools Settings and go to Preferences > Network.
  2. Tick Allow to generate HAR with sensitive data.
  3. Close settings and use the export button's drop-down to pick Export HAR (with sensitive data).

Double-clicking the .har file does nothing

Windows has no default app for .har files.

  1. Right-click the file and select Open with.
  2. Pick Notepad to read the raw JSON.
  3. For a readable request list, import it into the DevTools Network panel instead.

The problem only appears on a first visit

Cached files hide the requests that fail on a clean load.

  1. Tick Disable cache on the Network panel.
  2. Keep DevTools open, reload the page and export the HAR file.

HAR file FAQ

What is the HAR file full form?

HAR stands for HTTP Archive. It is a JSON-formatted file that records the network requests a browser made, including URLs, headers, status codes and timings, so a support team can see why a page failed.

How do I capture a HAR file in Edge?

Right-click the page and select Inspect, open the Network tool, tick Preserve log, refresh and reproduce the problem. Then select Export HAR (sanitized) in the action bar and save the file.

Can I open a HAR file in Edge?

Yes. Open Edge DevTools with F12, select the Network tool, and drag the .har file onto the Requests table or select the Import HAR file button. The requests appear with their headers and timings.

Where does Edge save a HAR file?

Edge saves the HAR file wherever you choose. After you select Export HAR (sanitized), pick the folder and file name in the save prompt, then attach that file to your ticket.

What is a HAR file analyzer?

A HAR file analyzer is a tool that reads the HAR JSON and shows the requests in a readable list. Google's HAR Analyzer at toolbox.googleapps.com runs in the browser, and Chrome, Edge and Firefox DevTools can import HAR files too.

What is the best HAR file viewer or reader?

The DevTools Network panel in Chrome, Edge or Firefox is the most complete viewer, because it shows the request waterfall and headers. A text editor such as Notepad works for searching the raw JSON.

Does a HAR file contain my password?

A sanitized export from Chrome or Edge leaves out the Cookie, Set-Cookie and Authorization headers. A full export can include session cookies and tokens, so share it only with the support team that asked for it.

Can I save a single request as a HAR file?

No. Edge's documentation states that the export saves all requests since DevTools opened, and you cannot filter requests or save a single one. Clear the log before you reproduce the problem to keep the file small.

Why is my HAR file empty?

DevTools was opened after the page loaded, or the log cleared on reload. Open DevTools first, turn on Preserve log or Persist Logs, reproduce the problem and export again.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *