How to use the HAR viewer and sanitizer
- Record the session in your browser: open the developer tools, the Network tab, reproduce the problem, then use Save all as HAR (Chrome and Edge) or Save All As HAR (Firefox).
- Paste the file’s content into the left pane.
- Summary (the default) lists every request with its method, status, time, size and URL, the slowest requests, the failures, and how many secrets the file contains.
- Switch Action to Sanitize to get a copy with the secrets masked. Choose what happens to Bodies: Mask secrets (the default), Keep as they are or Remove. Under More options you can add names to mask, such as an internal header.
- Copy or Download the result and attach it to the bug report.
What the summary tells you
- The number of requests, the data transferred and the program that recorded the file.
- How many responses are 2xx, 3xx, 4xx and 5xx, and how many have no response at all (blocked, cancelled or failed). The meaning of a status is in the HTTP status codes reference.
- The five slowest requests: the first place to look when a page feels slow.
- The failed requests, so a 504 or a 429 stands out. For a 429 read what Too Many Requests means, and for a 504 the Gateway Timeout page.
- The number of credentials the file holds. URLs in the list are shown with secret query values already masked, so the summary itself is safe to paste into a ticket.
How the masking works
Names are compared word by word, after splitting at hyphens, underscores, dots and capital letters, so X-Api-Key, api_key, apiKey and refreshToken are all found, and Content-Type, User-Agent or :authority are left alone. A query such as ?client=web&access_token=abc becomes ?client=web&access_token=[REDACTED], with every other character kept as it was. Inside a JSON body the keys are checked at any depth, and every string is scanned for the token shapes listed above. Cookies are masked by value, since a cookie value is almost always a session or an identifier.
Sanitizing is repeatable: running it on an already sanitized file changes nothing.
Before you share it
Open the result and search for names, e-mail addresses and ids you would not want to publish, and for anything specific to your company. A decoded token is also worth a look: the JWT Decoder shows what a token contained, which tells you what a leaked one would have exposed. To replay a request from the file, copy it as a command and convert it with cURL to code.
Frequently asked questions
Why is a HAR file dangerous to share?
It records every request of a session, with all headers, cookies and bodies: the Authorization header, the session cookie, the password you typed into a login form and the tokens that come back. Anyone who gets the file can often replay the session. Support teams ask for HAR files, so removing the secrets first matters.
What does Sanitize mask?
Header values with secret names (Authorization, Cookie, Set-Cookie, X-API-Key, any name with token, secret, password, session, csrf and similar words), every cookie value, query and form parameters with such names (also OAuth code and nonce), and JSON keys with such names inside request and response bodies. It also recognises tokens by their shape wherever they appear: JWTs, Bearer and Basic credentials, AWS, GitHub, Slack, Stripe and Google keys, private key blocks.
What does it not mask?
Personal data that has no secret name: people's names, e-mail addresses, phone numbers, ids, the content of pages and messages. It cannot know which of those you consider private. Read the result before you share it, remove bodies you do not need, or add names to the Also mask names box.
Can the sanitized file still be used for debugging?
Yes. The structure, the order, the timings, the sizes, the status codes, the URLs (minus secret query values) and the header names are kept, so a waterfall, a failed request or a slow call can still be investigated. Only the values that grant access are replaced by [REDACTED].
Does my file get uploaded?
No. The file is read and rewritten in your browser. The tool is marked sensitive: the input is never saved as a draft on this device and a share link asks you to confirm first.
Last updated