Bearer Auth Header Builder
Construct Authorization header values for Bearer, Basic, API key, and custom schemes with curl and fetch snippets.
Build Authorization headers for APIs
REST and GraphQL clients authenticate with Authorization headers or custom API
key headers. Bearer tokens carry OAuth 2.0 access tokens or JWTs. HTTP Basic encodes
username:password in Base64. This builder formats the header line plus ready
curl and fetch() snippets so you can test endpoints quickly.
Supported schemes
- Bearer, paste a token after the
Bearerprefix. - Basic, enter username and password; encoding uses browser Base64.
- API key, choose a header name such as
X-API-Key. - Custom, schemes like
TokenorDigestcredentials.
Inspect JWT claims after building a Bearer header with the JWT Decoder.
Frequently Asked Questions
Is Basic authentication secure?
Basic only encodes credentials; it does not encrypt them. Use HTTPS and prefer short-lived tokens or OAuth flows in production.
Are secrets sent to OnlineMiniTools?
No. Header strings are assembled in your browser. Clear the page when finished on shared machines.
Can I change the example URL?
Yes. The URL only appears in generated curl and fetch examples; it is not called automatically.