Tools
HAR sanitizer
Sanitize a HAR file before you attach it to a ticket or send it to a support team. Paste or upload the file, choose what to strip, and download a clean copy: cookies, auth headers, tokens in URLs, JWTs and request and response bodies are replaced with [REDACTED]. Everything runs in your browser, so the file is never uploaded.
Load a HAR file
Paste the JSON below, or upload a .har file. It is read and sanitized in your browser, with no upload and no network requests.
What to remove
Everything is on by default. Changes apply to the loaded file straight away.
Header, cookie or parameter names, separated by commas. Case, dashes and underscores are ignored, so user_email also matches userEmail.
Why a HAR file leaks secrets
A HAR file records every request your browser made while DevTools was open: full URLs with their query strings, request and response headers, cookies, form and JSON bodies, and the responses. That includes the session cookie and the bearer token that prove who you are. Anyone who gets the file can reuse them and act as you until they expire.
Browsers' own sanitized export only leaves out a few headers. Our guide to capturing a HAR file shows what each browser strips and what it leaves behind.
What the sanitizer removes
With the default settings it replaces every value below with [REDACTED]. Each group is a checkbox, so you can keep any of them.
- Cookies: the
CookieandSet-Cookieheaders, and the value of every cookie in the request and response cookie lists. Cookie names and flags stay. - Auth headers:
Authorization,Proxy-Authorization,X-Api-Key,X-Auth-Token, and any other header whose name contains token, secret, session, auth or key, such asX-CSRF-Token. HTTP/2 pseudo-headers such as:authority(the host name) don't count. - Secret parameters: the values of token, access_token, id_token, refresh_token, code, key, api_key, secret, client_secret, session, session_id, auth, sig, signature, password and passwd, plus the signing parameters of Amazon S3 and Google Cloud Storage signed URLs. They are masked in the request URL and its fragment, the query string list, the
:path,RefererandLocationheaders, redirect URLs, page titles and form bodies. Matching ignores case, dashes and underscores, soaccessTokencounts, but a name must match whole:postcodestays. - JWTs anywhere: any string shaped like a JSON Web Token, in any header, URL, body you keep, or comment. A bearer token in a header the other rules miss is still caught this way.
- Request and response bodies: the request
postDatatext and form values, everyresponse.content.text, and WebSocket messages sent and received. - Your extra names: any header, cookie or parameter name you type into the box, for IDs or tokens your own app uses.
The structure stays intact. Request order, methods, statuses, header names, sizes and timings don't change, so the clean file still opens in the HAR viewer and still explains the bug.
What it doesn't remove
The sanitizer looks for credentials by name and by shape. It can't know which other values are private to you, so check for these yourself:
- Secrets in bodies you choose to keep. In kept JSON bodies it masks fields with the secret names above, except the short ones that usually mean something else in JSON (code, key, session, auth and sig). A token under any other field name, or inside HTML, plain text or a base64-encoded body, stays.
- Personal data such as names, email addresses, account IDs and street addresses, wherever they appear.
- A token in a URL path, such as a password reset link, unless it is a JWT.
- A credential in a header with an ordinary name. Add the header name to the extra names box.
Privacy: the file never leaves your browser
Nothing you paste or upload is sent anywhere. The browser reads the file, the sanitizer cleans it in memory, and the download is created inside the tab. The tool makes no network requests and doesn't store the file, and the tool area is masked from the site's session analytics, so even the preview isn't recorded. To see it for yourself, open your browser's Network panel before you load a file: no request carries it.
How to check the output yourself
Spend a minute on the downloaded file before you send it:
- Open it in a text editor and search for
Bearer,eyJ(how every JWT starts),token,password,session, and your own email address and user name. - Search for a value you know was in the capture, such as your session cookie from the browser's storage panel. It should not appear.
- Load the file into the HAR viewer to confirm every request is still there.
On the command line, this lists any credential-like header that is still filled in:
jq '.log.entries[] | (.request.headers + .response.headers)[]
| select(.name | startswith(":") | not)
| select(.name | test("auth|cookie|token|key|secret|session"; "i"))
| select(.value != "[REDACTED]")' capture.sanitized.harWorked example
Here is one request from a checkout, as the browser exported it. It carries an access token in the URL, a JWT in the Authorization header, a session cookie each way, and an email address in the body.
Before
{
"request": {
"method": "POST",
"url": "https://api.example.com/v1/orders?access_token=9f8e7d6c5b&page=2",
"headers": [
{ "name": "Authorization", "value": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0MiJ9.k3yS1g" },
{ "name": "Cookie", "value": "sid=4f2a9c71; theme=dark" },
{ "name": "Content-Type", "value": "application/json" }
],
"postData": { "mimeType": "application/json", "text": "{\"email\":\"ada@example.com\",\"items\":[1,2]}" }
},
"response": {
"status": 201,
"headers": [
{ "name": "Set-Cookie", "value": "sid=8b1d03e4; HttpOnly; Secure" }
],
"content": {
"size": 35,
"mimeType": "application/json",
"text": "{\"id\":\"ord_123\",\"status\":\"created\"}"
}
}
}After, default settings
{
"request": {
"method": "POST",
"url": "https://api.example.com/v1/orders?access_token=[REDACTED]&page=2",
"headers": [
{ "name": "Authorization", "value": "[REDACTED]" },
{ "name": "Cookie", "value": "[REDACTED]" },
{ "name": "Content-Type", "value": "application/json" }
],
"postData": { "mimeType": "application/json", "text": "[REDACTED]" }
},
"response": {
"status": 201,
"headers": [
{ "name": "Set-Cookie", "value": "[REDACTED]" }
],
"content": { "size": 35, "mimeType": "application/json", "text": "[REDACTED]" }
}
}The tool reports 6 values replaced: 2 cookie headers, 1 auth header, 1 secret parameter, 1 request body and 1 response body. The page=2 parameter, the Content-Type header, the status and the size are untouched. With the body options switched off, both bodies would stay as they are, because neither holds a secret field name or a JWT; the email address would stay too.
Frequently asked questions
- Is it safe to put a HAR file into this page?
- Yes. The file is not uploaded. Your browser reads it, the sanitizer cleans it in memory, and the download is built inside the tab. The sanitizer makes no network requests and stores nothing, so it keeps working if you go offline after the page has loaded.
- Will the sanitized file still open in a HAR viewer?
- Yes. Only values change: each one becomes [REDACTED]. Every request, header name, status, size and timing stays where it was, so the file is still a valid HAR and opens in our HAR viewer and in other tools that import HAR files.
- Isn't the browser's own sanitized export enough?
- Not on its own. Chrome and Edge leave out the Cookie, Set-Cookie and Authorization headers, and Firefox doesn't sanitize its export. Tokens in URLs, in other headers and in request or response bodies stay in the file. Running it through this tool catches those too.
- Should I keep the request and response bodies?
- Only when the bug is in what was sent or returned. With bodies kept, the tool still masks JSON and form fields with known secret names and any JWT, but a secret under another field name, or personal data such as an email address, stays. Read the bodies before you share the file.
- How large a HAR file can it handle?
- Up to 50 MB. The work grows in step with the file size, so even a large file takes seconds, not minutes. If your capture is larger, filter the requests in DevTools before you export it.
- I already shared an unsanitized HAR file. What now?
- Treat every cookie and token in it as exposed. Sign out of the affected sessions or revoke them, rotate any API key the file contained, and then share a sanitized copy instead.

