Sanitize a HAR file

Runs locally in your browser. Your file never leaves your device.

By processing a file or pasted text here, you agree to the Terms.

Drop a .har file here — or

Exported from your browser's DevTools Network panel. Up to 20 MB — a large HAR can pause this tab for a few seconds while it is scanned; everything stays local.

…or paste HAR JSON instead
What gets masked in text fields

Cookie values are always masked. Turning off “passwords & secrets in key=value” also turns off name-based masking of credential-shaped headers and parameters — it is the same detection category.

A HAR is a recording of your logged-in session

When support says “send us a HAR,” they are asking for a complete capture of every request your browser made: URLs with their query strings, every request and response header, every cookie, POST bodies, response bodies, timings. That is what makes it useful for debugging — and what makes it dangerous to hand around. If you were logged in while recording, the file contains the session cookies and bearer tokens that are your login. This is not hypothetical: the 2023 Okta support-system breach worked exactly this way — attackers lifted session tokens from HAR files customers had uploaded to support tickets, and used them to enter those customers' systems. The file you attach to a ticket can outlive the ticket, the vendor, and your session-expiry assumptions.

What the browser's sanitize option covers — and what it can't

Browsers responded: Chrome's DevTools now offers a sanitized HAR export, and vendors like Okta sanitize HARs on upload. These are real improvements centered on the obvious carrier — cookies. But cookies are one of many places a HAR holds secrets. An Authorization header rides on every API call. API keys travel in query strings (?api_key=…), JWTs sit in URL paths and OAuth redirect fragments, the login POST carries a password in its body, the token endpoint's response echoes access and refresh tokens back — frequently base64-encoded, where a text search will never find them. And no browser can know that your vendor's X-Api-Key or X-Amz-Security-Token header is a credential. A vendor-side upload sanitizer only helps when you upload to that vendor — the copy you attached to an email, a Slack thread, or a different ticket system got no such treatment.

How this sanitizer works

It walks the HAR's structure rather than treating it as a blob of text. Cookie values — in Cookie and Set-Cookie headers and in the structured cookies arrays — are masked by position, because the format itself says what they are; names and attributes stay. Headers and parameters with credential-shaped names (authorization, x-api-key, session_token and relatives) have their values masked whole, even when the value looks harmless. Everything else that is text — URLs, remaining header values, query strings, request bodies, response bodies, comments — is scanned by the same pattern engine that powers this site's log file redactor: emails, IPv4/IPv6 addresses, JWTs, AWS keys, Bearer tokens, and key=value credentials. Base64 response bodies are decoded, scanned, and re-encoded — but only when they decode cleanly to text. Anything binary or undecodable is left byte-for-byte intact and its entry is flagged, because a sanitizer that corrupts entries is a sanitizer people stop trusting.

Masked values become placeholder tokens, and the same value always becomes the same token: the session cookie in the request header, the cookies array, and the next entry's request all show [COOKIE-1], so the causality a reviewer needs (“this response set the cookie that request sent back”) survives sanitization. The output stays valid HAR and loads in any viewer, and sanitizing an already-sanitized file changes nothing.

What it can miss — read this before you share

Detection is pattern-based and best-effort — expand for what can slip through.

Detection is pattern-based and incomplete by construction; any tool claiming otherwise is overpromising. The specific gaps: a secret under a bland name — a header called X-Ticket, a parameter called ref — is only caught if its value matches a known pattern or is long and random enough for the suspicious-string flagger (random strings under about 20 characters stay below its statistical floor). Prose-shaped passwords are invisible to entropy measures. Binary bodies are never inspected — their entries say so. And it can over-mask: JavaScript in a response body containing password=… looks exactly like a credential assignment, and masking it is the safer failure. That is why the viewer exists: each entry shows what was masked and what merely looks suspicious, side by side with the original, so the final human review takes minutes, not an afternoon of scrolling JSON.

Practical limits

Files are processed entirely in this tab's memory with a 20 MB ceiling. Scanning runs on the page's main thread, so a large HAR can freeze this tab for a few seconds — nothing is being uploaded during that pause; there is no network activity at all, which you can verify in DevTools. If your HAR is over the limit, filter the capture in the Network panel (or re-record just the failing requests) and export again. The page works offline once loaded, and nothing persists after the tab closes.

Sharing a single request instead of a whole capture? A copied-as-cURL command is one HAR entry rendered as shell — the curl command sanitizer gives it the same header, cookie, and body treatment without touching the quoting.

Frequently asked questions

What is a HAR file and why does support ask for one?

A HAR (HTTP Archive) is a JSON recording of every network request a browser tab made: URLs, headers, cookies, query strings, request bodies, and response bodies, with timings. Support teams ask for one because it shows exactly what your browser sent and received when something failed. That completeness is the problem — a HAR recorded while you were logged in contains the session cookies and tokens that ARE your login, so whoever holds the file can potentially replay your session.

My browser already has a “sanitized” HAR export — why is that not enough?

Browser-side sanitizing centers on cookies, and cookies are only one place secrets live. A HAR also carries Authorization headers, API keys and tokens in query strings, JWTs in URL paths, credentials in POST bodies, tokens echoed back in response bodies (often base64-encoded), and custom vendor headers like X-Api-Key. This tool masks cookies by position — the same baseline — and then scans everything else with pattern and name-based detection, including decoding base64 response bodies. Neither approach is complete, which is why the entry-by-entry viewer exists.

Does this page upload my HAR anywhere?

No. This is a static page with no server behind it, and its Content-Security-Policy is set to connect-src ‘none’ — the browser itself refuses to let this page make any network request, to us or to anyone. You can verify that: open DevTools, watch the Network tab, and load your file — no request carries your data. Everything runs in this tab’s memory and nothing persists after you close it.

Will the sanitized HAR still load in a HAR viewer?

Yes — that is a hard requirement of how it edits. Only string values are rewritten; the JSON structure, entry order, timings, sizes, and every name field stay put, so the output parses as valid HAR and loads in DevTools or any HAR viewer. Masked values become placeholder tokens like [COOKIE-1], and the same original value always becomes the same token, so “this cookie came back on the next request” is still visible. Running the file through the sanitizer twice changes nothing the second time.

Why are some response bodies marked “not scanned”?

HAR response bodies are often base64-encoded. If a body decodes cleanly to text, it is decoded, scanned, and re-encoded. If it does not — images, fonts, or corrupt base64 — rewriting it would destroy the entry, so it is left byte-for-byte intact and its entry is flagged so you know that content was never inspected. A binary body rarely holds a secret, but “rarely” is your call to make, not this tool’s.

Can it miss secrets?

Yes. Detection is pattern-based and incomplete by construction. A secret under a bland name — a custom header called X-Ticket, a query parameter called ref — is only caught if the value itself matches a known pattern or looks random enough for the entropy flagger (random strings under about 20 characters stay below its statistical floor). Prose-shaped passwords, secrets in binary bodies, and vendor-specific formats can all slip through. The per-entry viewer highlights what was changed and what looks suspicious so the final human review — the step no tool can replace — is fast. Never treat any automated sanitizer, this one included, as guaranteed.