How to add a custom header to requests in Chrome

You need every request to carry a header — an Authorization token, an X-Api-Key, a feature flag, a different Accept-Language — while you test in a real browser. Here's what Chrome can do on its own, and how to do the rest.

On this page
  1. What DevTools can and can't do
  2. One request: the console
  3. Every request a page makes: a header rule
  4. Checking the header was really sent
  5. When the header isn't sent

What DevTools can and can't do

Want toBuilt into Chrome?
Change the User-AgentYes — DevTools → Network conditions (how)
Override a response headerYes — DevTools → Sources → Overrides, then right-click a request in Network → Override headers
Add a request header to the page's own requestsNo

One request: the console

For a single API call, send it yourself from the DevTools console on the site's own tab, so cookies and origin are right:

const res = await fetch("/api/me", {
  headers: { "Authorization": "Bearer eyJhbGciOi...", "X-Feature-Flag": "new-checkout" }
});
console.log(res.status, await res.json());

Or from a terminal: curl -H "Authorization: Bearer …" https://api.example.com/me. Neither affects the page's own requests.

Every request a page makes: a header rule

To make the page itself send the header — every fetch, XHR, image and navigation — you need a rule in the browser that rewrites requests before they leave. Extensions do this through Chrome's declarativeNetRequest API. What to look for:

HeaderForge (Chrome, free)

Set or remove any request or response header, for all sites, chosen domains or just this tab. It shows when a rule actually fired, works on fetch, XHR and POST, and has presets for User-Agent, no-cache, X-Forwarded-For and removing CSP or X-Frame-Options. Imports ModHeader exports. No account, no analytics.

Get HeaderForge for Chrome

Checking the header was really sent

  1. Open DevTools → Network and reload.
  2. Click a request and open Headers → Request Headers.
  3. If you see "Provisional headers are shown", the list is incomplete — tick Disable cache and reload, or check what the server received in its logs.

When the header isn't sent

More on this topic: HTTP headers list: the request and response headers that matter · Referer header: what it sends, why it's empty, and how to change it · Cache-Control header explained: max-age, no-cache, no-store and more · iframe "refused to connect": what causes it and how to fix it