HAR File
Last updated on 16 July, 2025The HTTP Archive format, or HAR, is a JSON-formatted archive file format used for logging the interaction of a web browser with a site. The common extension for these files is .har
. In a network environment, when the sender and receiver communicate, the HAR file contains the HTTP request and response headers.
Note: A HAR file contains data such as cookie contents and the pages accessed during the recording session. Anyone with access to the HAR file can view the information transmitted during that session, which may include personal or other sensitive data.
Requirements for Creating HAR File
To create a HAR file, you must ensure any troubleshooting and HAR file collections are done within a supported browser and that the browser is up-to-date. For more information, see Supported Browsers.
To create HAR file in Safari, you must have the Develop menu. If not, navigate to Safari > Preferences > Advanced, and select the Show Develop menu in menu bar checkbox.
Creating HAR File in Firefox
- Open a Firefox browser window and navigate to the URL where the issue is occurring.
- Select F12 to open the Developer Tools pane.
- Navigate to the Network tab.
- Select Record to commence recording the network activity.
- Reproduce the issue you were experiencing.
- Right-click on the recorded events and select Save All as HAR to export the data.
Recommendation: To remove sensitive data before downloading or sharing, sanitize your HAR file using the Cloudflare HAR File Sanitizer tool and follow the onscreen instructions to download the sanitized file.
- To view the HAR file in Firefox, select F12 and do the following:
- Open Firefox browser window and navigate to the Network tab.
- Select Import HAR (usually represented by a small downward arrow icon or “Import”).
- Select the HAR file you require to view.
The network activity from the HAR file displays in the Network tab for inspection.
Creating a HAR file in Safari
- Open a Safari browser window and navigate to the URL where the issue is occurring.
- From the Develop menu, select Show Web Inspector.
- Refresh the page to begin capturing network traffic.
- Reproduce the issue you are experiencing.
- Select Control + click on the relevant resource and select Export HAR to save the data.
Recommendation: To remove sensitive data before downloading or sharing, sanitize your HAR file using the Cloudflare HAR File Sanitizer tool and follow the onscreen instructions to download the sanitized file.
- To view a HAR file in Safari, do the following:
- Open a Safari browser window and navigate to the Develop menu at the top of the window.
- Openthe Web Inspector by selecting Develop > Show Web Inspector.
Alternatively, select Option + Command + I. - In Web Inspector window, navigate to the Network tab.
- Select the gear icon (settings) and enable the Preserve log switch so that network logs persist between page reloads.
- If you already have a HAR file, drag and drop it into the Network tab of the Web Inspector to load and view the recorded data.
Alternatively, you can right-click inside the Network tab and select Import HAR to choose the HAR file from your computer.
The network activity captured in the HAR file displays in the Network tab for you to inspect.
Creating HAR File in Chrome
- Open a Google Chrome browser window and navigate to the page where the issue is occurring.
- Select the three vertical dots (⁝) and then navigate to More Tools > Developer Tools.
- In the Developer Tools panel, select the Network tab.
- Ensure the Record button (a circle) is red. If it is grey, select it once to start recording.
- Select the Preserve log checkbox to retain network logs even when the page reloads.
- Select the Clear button to remove any existing logs from the Network tab.
- Reproduce the issue while the network activity is being recorded.
- After reproducing the issue, click Download and save the file as HAR with Content to your computer.
Recommendation: To remove sensitive data before downloading or sharing, sanitize your HAR file using the Cloudflare HAR File Sanitizer tool and follow the onscreen instructions to download the sanitized file.
- To view the HAR file in Chrome, do the following:
- Open Chrome browser window and select F12. Alternatively, right-click and select Inspect.
- Navigate to the Network tab.
- Right-click inside the Network tab and select Import HAR.
- Choose the HAR file you are required to view.
The network activity from the HAR file displays in the Network tab for inspection.
Creating HAR File in Microsoft Edge
- Open the Microsoft Edge browser and navigate to the page where the issue is occurring.
- Select F12 to open the Developer Tools pane.
- Clear the session history by selecting the button with three horizontal lines and a red “X.”
- Select the Play button in the debug pane to start recording network activity.
- Reproduce the issue you were experiencing.
- Once the issue has been reproduced, select the Red Square to stop recording.
- Export the results by pressing the Save button (floppy disk icon) and saving the file as a HAR file.
Recommendation: To remove sensitive data before downloading or sharing, sanitize your HAR file using the Cloudflare HAR File Sanitizer tool and follow the onscreen instructions to download the sanitized file.
- To view a HAR file in Microsoft Edge, do the following:
- Open a Microsoft Edge browser window and select F12.
Alternatively, right-click on the page and select Inspect to open the Developer Tools. - Navigate to the Network tab in the Developer Tools.
- To Import the HAR file, right-click anywhere inside the Network tab and select Import HAR from the context menu.
- Choose the HAR file you require to view from your computer.
The network activity from the HAR file displays in the Network tab for inspection.
- Open a Microsoft Edge browser window and select F12.