CSP Generator
Build a Content-Security-Policy header directive by directive.
Build an HTTP Basic Authorization header from a username and password.
The Basic Auth Generator builds an HTTP Authorization header from a username and password, decodes an existing one back to its credentials, and generates matching curl, fetch and axios snippets.
HTTP Basic authentication joins the username and password with a colon, Base64-encodes the pair and puts the result in an Authorization header. That is the entire mechanism, which is both why it is so widely used and why it needs HTTPS to be anything other than plaintext.
This builds the header, and also decodes one — paste an existing Authorization value and you get the credentials back, which is a quick way to see why a request is being rejected. Snippets for curl, fetch and axios come with it. A colon in the username is the one thing Basic auth cannot represent, and the tool says so rather than producing a header that silently splits in the wrong place.
Paste an Authorization value to see the credentials it carries, which is the quickest way to find out why a request is being rejected.
curl, fetch and axios versions are generated alongside the raw header.
A colon in the username cannot be represented, and the tool says so rather than producing a header that splits in the wrong place.
Non-ASCII credentials are UTF-8 encoded before Base64, which is what modern servers expect.
The page is explicit that this is an encoding, not encryption, and that Basic auth needs HTTPS to mean anything.
Username and password; a colon in the username is flagged as invalid.
The complete Authorization line, ready to paste into a client.
curl, fetch and axios versions are generated alongside.
Paste a Base64 credential to see the username and password it carries.
No. Base64 is an encoding, not encryption, and anyone who sees the header can decode it instantly. Basic auth is only acceptable over HTTPS, where TLS protects the header in transit.
No. The colon is the separator, so a username containing one would be split in the wrong place. The password may contain colons freely, since only the first one counts.
They are UTF-8 encoded before Base64, which is what modern servers expect. Some older servers assume Latin-1, which is why an accented password occasionally fails against legacy software.
For internal tools, machine-to-machine calls and API keys over HTTPS, yes — it is simple and universally supported. For end-user login it is a poor fit, because there is no clean way to log out.
What people who use the Basic Auth Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Basic Auth Generator. It takes half a minute and no account.
Write the first reviewBuild a Content-Security-Policy header directive by directive.
Generate the border trick that makes triangles and tooltip arrows.
Generate ULIDs — sortable by creation time and case-insensitive.
Check YAML parses and find the line where the indentation goes wrong.
Every regex token, searchable, with an example of what it matches.
Learn and generate flexbox layouts with a live, interactive preview.
Produce SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text.
Convert a TOML config to JSON, with tables and arrays of tables resolved.