Skip to content

Generate a HAR file in Chrome browser using Developer Tools

Do you need to generate HAR files in Google Chrome? Learn how to set up and create HAR files for detailed troubleshooting.

The HAR file, or HTTP Archive file, contains all the network and browsing session-related logs used by developers to debug an issue on the webpage.

The generated HAR file records all interactions, including the cookies and passwords used in the sessions. We can generate HAR files using the developer console in the Chrome browser.

In this guide, we have shared the steps to generate the HAR file in Google Chrome.

What is a HAR file, and Why is it Essential for Troubleshooting?

If you come across a website that needs to be fixed, just sending the screenshot of that issue and a few error statements would only help them in some cases.

They would need to understand the technical details of the error-causing site, which is where the HAR file comes in handy.

An HTTP Archived file format records all interactions between your browser and the website with an issue. Generate HAR file

Some of the data it stores includes the site loading time, the resources that can load correctly, the ones that are getting blocked, and the issues related to rendering on-page elements. These network-related data are then stored and compressed into a HAR format.

Once this file is created, you could export and send it to the site developer or webmaster, who can read the technical details and act accordingly to fix the issue.

Generate a HAR file in Chrome App

You do not need to add extensions to generate a HAR log file. The built-in developer tools can record error logs and generate HAR files. Here are the steps to generate:

  1. Launch the Chrome browser on your PC.
  2. Open the page whose logs you need to collect.
  3. Click More vertical 3-dots icon at the top right, and select More Tools > Developer Tools.
    Developer Tools options in Chrome Menu listYou could also access the same via the Ctrl + Shift + I Chrome shortkeys.
  4. Switch to the Network tab and enable checkmark the Preserve Log option.
    Network Tab Preserve Logs options in Chrome computer
  5. Refresh the webpage using reload arrow icon OR Ctrl/Cmd +R key; this should start the recording.
    Make sure that you are seeing the red recording icon.
    Recording the Chrome Network tab for HAR file
  6. Now try to reproduce the issue you were facing earlier so that it gets saved in this HAR error log.
  7. Click on the red circular icon to stop the recording.
    Recording the Network Tab in Chrome browser
  8. Click on the Download icon at the extreme right to export this HAR File.
    Download button to save the network logs as HAR file
  9. Give the file any name of your choice (but leave the extension as .har) and hit Save.
    Save HAR file with .har file extension

The HAR file will save all logs in a file. You may email it to the concerned authority or send it via any other medium.

Bottom Line

Remember that when the logs are being recorded, they store all the resources loaded during that browser session.

It might include the cookies and any information you save during this time frame (such as passwords, payment details, etc.).

So, it’s better not to interact with confidential information while recording your session. Furthermore, only send the HAR file if you trust the developers. The HAR file can also be helpful to report the issue with Chrome Developers.

Please share the article if you find it helpful:

Disclosure: This page may contain affiliate links, which means we may receive compensation for your purchases; of course at no extra cost to you (indeed, you may get special discounts).
Kushal Azza

Kushal Azza

Kushal Azza is a Google Certified Analytics & IT Professional, Digital Content Creator, and Go-To Digital Marketer with an Engineering Degree. He has over a decade of experience solving tech problems, troubleshooting, and innovating digital solutions. Follow him on Twitter and LinkedIn.

Leave a thought or feedback

Please leave a descriptive comment or feedback with your real name. Our human moderator vets every comment, and it may take 24 to 48 hours to get published or rejected.

Your email address will not be published, and we will never spam your inbox. Required fields are marked *