64
64Encode

HTTP Basic Auth Base64 Header Generator

Generate Authorization: Basic <base64> headers from username and password plus ready-to-use curl and fetch() snippets.

Decode JWT Token on 64Decode
Authorization Header
cURL Snippet
JavaScript fetch()
Technical Guide

Generate HTTP Basic Auth Base64 Headers, cURL & fetch() Snippets

HTTP Basic Authentication encodes username:password in Base64 and sends it in the Authorization: Basic <token> header. Generate your header and copy-ready cURL and JavaScript fetch() snippets safely without exposing credentials to a remote server.

Why You Should Never Use Server-Side Basic Auth Generators

Sending your API keys or passwords to a third-party server just to Base64-encode username:password risks credential harvesting. 64Encode computes the Base64 token strictly in your browser memory.

Instant cURL & JavaScript fetch() Code Generation

Alongside the raw Authorization: Basic header, you get ready-to-run cURL and fetch() snippets. Working with JWT bearer tokens too? Inspect them locally with JWT Decoder on 64Decode.

Frequently Asked Questions

Common Questions

How is an HTTP Basic Auth header constructed?

The client joins the username and password with a colon (username:password), Base64-encodes the UTF-8 string, and prefixes it with Authorization: Basic .

Is it safe to enter my API key or password here?

Yes. 64Encode runs 100% in your browser with zero network requests, so your credentials are never transmitted or logged.

Is Base64 Basic Auth encrypted?

No! Base64 is encoding, not encryption. Always use HTTPS/TLS when sending HTTP Basic Authentication headers over a network.

Can I leave the password blank for API-key-only Basic Auth?

Yes. Many APIs (like Stripe) use the API key as the username with an empty password, which encodes as <api_key>:.

How do I decode a JWT token instead of Basic Auth?

Click Decode JWT Token to inspect JWT headers, claims, and expiration timestamps on 64Decode.com.