Privacy Tool
Runs in your browser. Nothing is uploaded.

HAR File Sanitizer: Remove Cookies, Tokens and Secrets

Scrub HTTP Archive recordings before attaching them to bug reports or customer support tickets. Mask session cookies, Authorization bearer headers, API keys, and sensitive JSON keys.

Processing archive... 0%
Sanitization Rules & Entropy Filters
Headers & Credentials
Payloads & Deep Scan
Replacement & Custom Rules
Original HAR 0 entries 0 KB
No HAR file loaded yet
Drag and drop your .har file here, click Upload, paste raw JSON, or test with our sample archive.
Sanitized HAR 0 redacted 0 KB
Headers: 0 Cookies: 0 Query: 0 Bodies: 0 Patterns: 0
Size Δ: 0%
Sanitization Pending
Load or paste a HAR file, configure replacement rules if desired, and click “Sanitize HAR”.
Automated Quality & Security Validation

Zero-Trust Browser Test Suite

Execute automated assertion checks in real time against high-risk credential vectors, Set-Cookie variations, JSON-in-string payloads, and timing preservation.

Auth & API Headers IDLE

Case-insensitive Authorization, Proxy-Auth, and x-api-key redaction.

Set-Cookie Attributes IDLE

Preserves Path, Domain, and HttpOnly attributes while masking cookie secrets.

URL Tokens in Path & Query IDLE

Redacts access_token query parameters and sensitive URL path tokens.

JSON-in-String Payloads IDLE

Deeply parses escaped stringified JSON embedded in request/response bodies.

Nested Array Traversal IDLE

Recursively checks nested matrix arrays containing sensitive key values.

Base64 Image Stripping IDLE

Removes heavy base64 image and font assets to drastically reduce archive size.

Consistency Across 50 Hits IDLE

Verifies the exact same secret maps to the same [REDACTED_n] token.

DevTools HAR 1.2 Validity IDLE

Ensures timestamps, status codes, and structural integrity remain intact.

Security Architecture & Guide

What is a HAR File and Why is Sharing It Dangerous?

A HAR (HTTP Archive) file is an industry-standard JSON-formatted log file generated by modern desktop and mobile browsers—including Google Chrome, Mozilla Firefox, Microsoft Edge, and Apple Safari. Standardized by the W3C Web Performance Working Group, the HAR format captures detailed records of every HTTP transaction between your browser and the remote web servers it interacts with.

A typical HAR archive records full request URLs, query parameters, HTTP headers, request POST data, server response codes, response bodies, and microsecond-level timing breakdowns (DNS lookup, SSL handshake, Time to First Byte, and content download). While these metrics make HAR files the gold standard for troubleshooting network latency, API timeouts, and user interface rendering defects, they carry catastrophic security liabilities if shared in their raw, unredacted state.

HAR 1.2 Redaction Architecture: Before vs After
Unredacted (Vulnerable)
{
  "name": "Authorization",
  "value": "Bearer eyJhbGciOiJIUzI1Ni..."
},
{
  "name": "Cookie",
  "value": "session_id=a94df8e12b7;"
},
"postData": {
  "text": "{\"password\":\"Sup3rS3cr3t!\"}"
}
Sanitized by MafLabs
{
  "name": "Authorization",
  "value": "Bearer [REDACTED_1]"
},
{
  "name": "Cookie",
  "value": "session_id=[REDACTED_2];"
},
"postData": {
  "text": "{\"password\":\"[REDACTED_3]\"}"
}

The Anatomy of Session Hijacking via Browser Logs

When you reproduce a software bug while authenticated to a web portal (such as AWS Management Console, GitHub Enterprise, Jira, Salesforce, or Stripe), your browser actively transmits confidential credentials with every single network request. These include:

  • Session & CSRF Cookies: Values located in request.cookies, Cookie headers, and Set-Cookie server response instructions. An adversary or unintended recipient possessing these cookie strings can clone your active session and bypass Multi-Factor Authentication (MFA) entirely.
  • OAuth Bearer Tokens & API Keys: Microservice API transactions typically embed JSON Web Tokens (JWT) or access keys in Authorization: Bearer <jwt>, x-api-key, or x-auth-token.
  • Cleartext Credentials in Form Bodies: Login submissions, registration sequences, and OAuth token exchanges pass unhashed passwords, credit card numbers, and API client secrets directly within postData.text.
  • Pre-Signed Query Tokens: Temporary AWS S3 download parameters, Stripe checkout URLs, or time-limited tokens embedded in query strings.

How to Safely Export and Sanitize HAR Files

  1. Reproduce in a Clean Window: Where feasible, open an Incognito or Private browsing window with third-party extensions disabled to minimize extraneous noise.
  2. Record & Export from DevTools: Open Chrome/Firefox DevTools (F12 or Ctrl+Shift+I), switch to the Network tab, verify "Preserve log" is checked, reproduce the issue, and click the Export HAR icon.
  3. Drop into MafLabs HAR Sanitizer: Drop your .har file into this tool. The parsing engine executes strictly inside your local browser memory.
  4. Select Redaction Mode: Choose between Consistent Indexed mode (ideal for debugging because identical secrets receive identical placeholders like [REDACTED_1]), Static replacement, or cryptographic SHA-256 hashes.
  5. Verify Zero Leakage & Download: Confirm the green "Verification Passed" banner is displayed, then download the sanitized file (named original-sanitized.har). The structural timings and status codes remain authentic, enabling support engineers to diagnose performance without security risks.

Common Problems When Sharing Network Logs

The most common mistake when sharing HAR logs is performing naive find-and-replace text edits in text editors like Notepad or VS Code. This often breaks JSON string escaping (e.g. altering quotes or backslashes inside JSON-in-string payloads), which invalidates the JSON schema and prevents Chrome DevTools or Charles Proxy from opening the archive. MafLabs HAR Sanitizer parses and deeply walks the abstract JSON tree, ensuring syntax compliance while replacing every sensitive token.

Frequently Asked Questions

1. Is it safe to share a HAR file after using this tool?
Yes. MafLabs HAR Sanitizer systematically strips authorization headers, session cookies, URL query tokens, and recursive JSON credential keys. Furthermore, an automated leak-check re-scans the finalized document for known API token shapes and JWT signatures.
2. What does a HAR file contain?
An HTTP Archive (HAR) file contains a comprehensive telemetry recording of network activity, including HTTP headers, cookies, URLs, POST payloads, server responses, IP addresses, and microsecond timing intervals for all network requests.
3. Is my HAR file uploaded to any remote server or cloud AI?
Never. This application is 100% browser-only and contains zero backend servers, zero AI API connections, and zero tracking scripts. You can turn off your internet connection or inspect your browser's Network tab to confirm zero outgoing bytes.
4. Does the sanitized HAR still open cleanly in Chrome DevTools?
Yes. We strictly adhere to the W3C HAR 1.2 specification. Status codes, latency benchmarks, DNS lookups, and waterfall charts are preserved intact so developers and support teams can analyze performance uninterrupted.
5. How does the “Consistent Indexed” replacement mode work?
Consistent indexing maps each unique secret string to a deterministic token (e.g. all 50 occurrences of your user token become [REDACTED_1]). This allows engineers to trace request flows across multiple API calls without exposing the underlying credential.
6. Can this utility handle large archives (>50MB)?
Yes. The heavy parsing and regex analysis executes in a background Web Worker so your browser interface remains smooth and responsive. Additionally, enabling "Strip binary/base64 content" can compress large archives by up to 85% by dropping bulky images and fonts.
7. Does it catch everything?
While our regex patterns and entropy scanners catch virtually all industry-standard credentials (JWTs, AWS keys, GitHub tokens, OpenAI keys, session cookies, passwords, and emails), we always recommend performing a quick visual inspection of the output before external delivery.