Base64 encode/decode · Guide

Base64 and HTTP Basic Auth

HTTP Basic auth encodes a username and password as Base64 in the Authorization header. Understanding the format helps when debugging API requests.

The header format

Basic auth joins the username and password with a colon, Base64-encodes the result, and sends it as "Authorization: Basic <encoded>". Decoding the value reveals user:password — which is exactly why the channel must be encrypted.

Build and debug it

To construct a header, encode "user:pass". To debug one, decode the part after "Basic " to confirm the credentials are what you expect. The encoder/decoder handles both directions.

Always over HTTPS

Because Base64 is reversible, Basic auth offers no confidentiality on its own. It is only safe over HTTPS, which encrypts the whole request.

Frequently asked questions

Can I use this for production work?

Yes, for inspection, formatting and quick generation. Still review the output before committing it to production code or configuration.

Ready to try it?

Open the free browser-based Base64 encode/decode and apply what you just read — no sign-up, runs locally.

Open the Base64 encode/decode tool