Basic Auth Header Generator

Generate HTTP Basic Auth headers from any username and password, and decode existing values back to credentials. Works with curl, Postman and API clients.

How it works

What the header actually carries

The whole scheme is one line: `Authorization: Basic base64(username:password)`. Credentials become UTF-8 bytes through `TextEncoder`, those bytes become a binary string, and `btoa` produces the token — so the colon in the decoded form is the only delimiter the format has. Decoding splits on the first colon, which makes a password containing colons round-trip cleanly while a username containing one cannot: everything after the first separator becomes the password.

RFC 7617 leaves the credential charset unstated in the base grammar, and older servers decode those bytes as ISO-8859-1. This generator always emits UTF-8, which is what a server advertising `charset="UTF-8"` expects; against a Latin-1 server a non-ASCII password arrives as mojibake. Base64 output is also padded with `=` to a multiple of four characters, and the scheme is case-sensitive, so a header reflowed or de-padded by an intermediary stops decoding.

Encoding is not encryption

Base64 is a reversible transport encoding, not a cipher. Anyone who sees the header — a proxy log, a HAR file, a shoulder-surfed screen, a support ticket — has the plaintext password, and can replay the header verbatim for as long as the credential stays valid. Basic Auth carries no nonce, no timestamp, no expiry and no scope, so there is nothing that distinguishes a legitimate request from a replayed one.

The practical consequences shape how you use the output. Treat a generated header as a live secret: never paste one into an issue tracker, and never commit it. The Copy button in decode mode copies the input string rather than the decoded credentials, which is deliberate but easy to misread as an export of what you just inspected.

Where Basic Auth still makes sense

It remains defensible for a bootstrap credential on an internal network, a git-over-HTTP remote, or a throwaway device credential where standing up an authorisation server costs more than the risk — and even then only over HTTPS, since the scheme offers no integrity of its own. For anything user-facing or long-lived, prefer a Bearer token or an API key: they can be scoped, rotated, expired and revoked without touching the client, and they do not resend the same secret on every request to every path under the protected space.

Frequently Asked Questions

How do I generate HTTP Basic Auth credentials?
Enter a username and password, then click Generate. The tool encodes them as a Base64 Authorization header value in the format username:password. Copy the header value and add it to your HTTP requests.
Is Basic Auth secure?
Basic Auth transmits credentials with every request. Always use HTTPS to encrypt the connection. For better security, consider using OAuth 2.0 or API keys with proper scoping instead.
Is my data sent to a server?
No. Every tool on jsonversal runs entirely in your browser using the Web Crypto API, File API, and Clipboard API. Nothing is ever uploaded — not even the JSON you paste in.
Do I need an account or API key?
No signup, no email, no API key. All tools are free to use with no signup required.
Can I use these tools offline?
Yes. Once the page loads, all tools work offline. There are no external API calls or CDN dependencies at runtime.
🔒
Your data never leaves your device

All processing happens in your browser. No uploads, no tracking, no servers. Your API keys, configs, and private payloads stay private — 100% client-side.

esc
↑↓ navigate ↵ open esc close