Privacy and Security

How to Read a HAR File and Remove Secrets Before Sharing

Understand HAR files: how to export one, read the waterfall and timings, find slow or failing requests, and sanitise cookies and tokens before sharing.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
How to Read a HAR File and Remove Secrets Before Sharing

How to Read a HAR File and Remove Secrets Before Sharing

When a website misbehaves for one customer, support teams often ask for a HAR file. It is a complete recording of what the browser requested and received while the problem happened, and it is one of the most useful debugging artefacts there is. It is also one of the most sensitive, because it can contain session cookies, access tokens and even passwords typed into forms. This guide explains how to create and read a HAR file and how to clean it before sending, using the HAR File Viewer and Sanitizer.

What a HAR file contains

HAR stands for HTTP Archive, a JSON format described in a specification drafted under the W3C Web Performance Working Group. For each request it stores the method, URL, request and response headers, cookies, query parameters, any posted data, the status code, sizes and a timing breakdown. It can also include response bodies. Browsers, proxies such as Charles and Fiddler, and automated testing tools all export it.

Exporting one

In Chrome or Edge, open DevTools with F12, choose the Network tab, tick Preserve log if the problem involves a redirect, reload the page and reproduce the issue. Then right-click in the request list and choose Save all as HAR. Firefox and Safari offer the same option in their network panels. Reproduce only the problem, so the file stays small and focused.

Reading the waterfall

The waterfall shows each request as a bar along a timeline. Each bar is split into phases:

  • Queued or blocked: waiting for a free connection or lower priority.
  • DNS: looking up the host name.
  • Connect and TLS: opening the TCP connection and negotiating encryption.
  • Send: uploading the request.
  • Waiting: time to first byte, mostly server work and latency.
  • Download: receiving the response body.

Long waiting phases point at the server. Long download phases point at big files or slow networks. Many separate DNS, connect and TLS phases point at too many different hosts. Marks for DOMContentLoaded and the load event show when the page became usable.

Finding the problem

Filter for 4xx and 5xx statuses first: a failing API call is often the whole story. Then sort out the slowest and largest requests. Unoptimised images and large JavaScript bundles are the usual suspects for slow pages, and third-party scripts frequently add hosts and blocking time you did not expect. Request details show the headers sent and received, which is where caching problems, wrong content types and missing CORS headers become visible.

Why sanitising matters

A HAR file can let anyone who receives it act as you. Session cookies and bearer tokens in the file may still be valid when someone else reads it. Treat an unsanitised HAR like a password. Before sharing, remove:

  • Authorization, Cookie and Set-Cookie headers and API key headers.
  • Cookie values in the cookie lists.
  • Query parameters with names like token, key, secret, session or signature.
  • Password and token fields in posted JSON or form data.
  • Response bodies, if they include personal data.

Pattern-based redaction catches the common cases but not everything. Names, email addresses and order numbers can appear in URLs and content. Open the sanitised file, search for anything personal, and only then send it. As an extra safeguard, log out after recording, which invalidates the session the cookies belonged to.

Good practice for support teams

  1. Ask customers to reproduce only the failing step.
  2. Provide a sanitising tool or clear instructions.
  3. Store HAR files with restricted access and delete them when the ticket closes.
  4. Never paste HAR contents into public issue trackers.

Limits

A viewer can only show what the browser recorded; timings differ between devices and networks, and some tools omit sizes or timings. Automated sanitising reduces risk but cannot guarantee that a file is free of personal data, so a human review is still needed before sharing.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages