Skip to content

How to Generate HAR file in Chrome browser

Learn how to set up and generate HAR file on the Google Chrome browser. This HAR file can record the steps and website error which can be used for debugging.

HAR file or HTTP Archive file contains all the network and browsing sessions related logs used by developers for debugging an issue on the webpage. Generated HAR file records all the interactions, including the cookies and passwords in the sessions. We can quickly generate HAR files using the developer console in the Chrome browser.

Generate and Share HAR file on Chrome browser

If you come across a website that isn’t functioning along the expected lines and wishes to convey the same to the network administrator, then just sending the screenshot of that issue along with a few error statements wouldn’t help them.

This is because they would need the technical details of the error-causing site to understand the issue and rectify it on your end. This is where the HAR file comes in handy. It is an HTTP Archived File format that records all interactions between your browser and the website currently opened. Generate HAR file

Some of the data it stores includes the site loading time, the resources that are able to load correctly, and the ones that are getting blocked, as well as 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 network administrator, who would then be able to read the technical details and act accordingly.

In this regard, Google Chrome has made it easy to create this network log file, and this guide will inform you of the steps to do just that. So without further ado, let’s get started.

Generate HAR file in Chrome

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 the HAR file:

  1. Launch the Chrome browser on your PC.
  2. Open the page whose logs you need to collect.
  3. Click on More vertical 3dots icon situated 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 shortcut keys combination.
  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 circular icon; if it’s a grey one, click on it once to turn red.
    Recording the Chrome Network tab for HAR file
  6. Now try and 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

That’s it. The HAR file will all logs will be saved in a file. You may email it to the concerned authority or send it via any other medium.

Bottom Line

So this was all from this guide on creating a HAR File in Google Chrome. Remember that when the logs are being recorded, it will store all the resources being loaded during that current browser session.

This 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 deal with confidential data while your session is recorded. Furthermore, only send the HAR file if you trust the developers at the other end.

On that note, we conclude this tutorial on how to generate HAR files in a Chrome browser. If you have any queries about the instructions above, please let us know in the comments section below.

Lastly, if you've any thoughts or feedback on How to Generate HAR file in Chrome browser, then feel free to drop in below comment box. You can also report the outdated information.

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 using our links; of course at no extra cost to you (indeed, you may get special discounts).

Sadique Hassan

Sadique is a Bachelor of Computer Application in Computer Science and an MBA professional. He became a tech writer by choice and has continued pursuing it for the last 7+ years. He is keenly interested in open-source technology like Android and also loves troubleshooting the tech. Connect with him on LinkedIn.

Share us your thoughts and feedback

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