Skip to content
Tools Without AI

Prefer toolswithoutai.com in Google Search so our tools and guides show up more often. Google has to confirm it — we cannot set this for you.

API header cleaner

Clean API tokens, Authorization headers and cookies locally. 100% private, no-upload processing with zero server latency.

No uploads. No account. Free to use.

Redacts Authorization, Cookie, API keys, and token-like query parameters before you share a log.

Prefer toolswithoutai.com

Opens Google’s picker with toolswithoutai.com pre-filled.

Under the Hood: The Architecture of API Token Header & Cookie Cleaner

Incident tickets, GitHub issues, and Slack threads are where live credentials go to die. Engineers paste curl, Charles/Fiddler dumps, and HAR excerpts that still contain Authorization, Cookie, and access_token query params. A service that offers to clean API headers on a server is a paradox: you upload the leak to prevent the leak. Sanitize browser cookies and tokens in-process instead.

This page is a pure function of a string. Native APIs: RegExp, URL, URLSearchParams, optional Clipboard write, and Blob download. It does not instantiate Headers/Request against a network; those interfaces are documentation-level cousins. No dump is persisted.

Memory Allocation & Browser Threading Mechanics

useMemo maps lines on each keystroke. Cost is linear in dump length. Each absolute URL allocates a URL object; malformed tokens are caught and the original substring kept so one bad character does not destroy the rest of a curl line. Main thread is fine for support-sized pastes (tens of KB). A 50 MB HAR should be filtered elsewhere first; this tool is for headers, not full HAR replay.

Algorithmic Deep-Dive: Code Snippet & Logical Analysis

const SECRET = /^(authorization|proxy-authorization|cookie|set-cookie|x-api-key|x-auth-token|x-access-token|api-key)\s*:/i;

function cleanHeaders(raw) {
  return raw.split(/\r?\n/).map((line) => {
    if (SECRET.test(line)) return line.split(":")[0] + ": [REDACTED]";
    return line
      .replace(/https?:\/\/[^\s'"]+/gi, (url) => {
        try {
          const u = new URL(url);
          for (const key of [...u.searchParams.keys()]) {
            if (/token|key|secret|auth|password|session/i.test(key)) {
              u.searchParams.set(key, "[REDACTED]");
            }
          }
          return u.toString();
        } catch { return url; }
      })
      .replace(/\b(Bearer|Basic)\s+\S+/gi, "$1 [REDACTED]");
  }).join("\n");
}

Header-name redaction preserves the field so the dump remains a valid narrative (“yes, they sent Cookie”). Values become [REDACTED]. Inline Bearer/Basic on non-header lines (curl -H) are caught by the second replace. Query scrubbing is name-heuristic: token, key, secret, auth, password, session. False positives on keyboard= are possible; false negatives on t=eyJ are also possible—review the output before sharing.

The Local Storage Sandbox & Volatile Data Pipelines

Two strings in React state: dirty and clean. Copy uses navigator.clipboard.writeText on the clean string. Download wraps it in a text/plain Blob and revokes the object URL. There is no “recent dumps” drawer. Navigation drops both strings; GC reclaims them. Do not screenshot the input pane.

Verifying True Privacy: How to Audit Your Browser's Network Tab

F12 → Network → clear. Paste Authorization: Bearer eyJhbGciOiTEST and a Cookie: session=supersecret line. Copy sanitized. Search the HAR for eyJhbGciOiTEST and supersecret. Zero payload hits is a pass. That is the only honest test for an API header cleaner.

  • Files never leave your device
  • Runs entirely in your browser
  • No signup required
  • Free

What is API header cleaner?

A local sanitizer for API logs that redacts Authorization, cookies, and token-like query parameters before you share a trace.

Key features

  • Redact Authorization and cookies
  • Token query-parameter scrubbing
  • Copy or download sanitized logs
  • No upload of credentials

How to use it

  1. Paste raw HTTP headers, a curl command, or a request dump.
  2. Authorization, Cookie, API keys, and token query params are redacted.
  3. Copy the sanitized log. Regex and URLSearchParams run locally.

When to use it

Support dumps and GitHub issues often leak live credentials. Cleaning headers on-device is the safe default.

Frequently asked questions

Are my files uploaded?

No. This tool runs in your browser. Files and text stay on your device and are not sent to our servers.

Does this use AI?

No. It is a deterministic utility. There is no model and no third-party processing of your data.

How do I remove Authorization tokens from HTTP headers?

Paste the block. Bearer, Basic, and raw Authorization lines are replaced with a placeholder.

How do I safely clean cookies before sharing API logs?

Cookie and Set-Cookie values are stripped so session IDs are not in the paste.

How can I sanitize API request logs without exposing credentials?

Do it in the browser. This tool never posts the dump; it rewrites secrets with regular expressions and the URL API.

Related tools

More in Developer tools.