Skip to content
uencoder
TASK

Use HTTP Basic Authentication

Basic Auth sends credentials as Base64-encoded username:password in the Authorization header. Learn the format, security requirements, and alternatives.

  1. 1

    Basic Auth sends "Authorization: Basic <base64(username:password)>" in the HTTP header. The credentials are encoded (not encrypted) — Base64 is reversible. Always use Basic Auth over HTTPS; over HTTP, credentials are exposed. The browser shows a native login prompt when a server returns 401 with WWW-Authenticate: Basic.

  2. 2
    Base64 Encoder →

    Encode "username:password" as Base64 to create the Authorization header value. For example, "admin:secret" → "YWRtaW46c2VjcmV0". The header is: Authorization: Basic YWRtaW46c2VjcmV0.

  3. 3
    Base64 Decoder →

    Decode a Basic Auth header to extract the credentials. Remove "Basic " prefix, Base64-decode the rest, split on ":". This is what servers do to verify credentials. Never log the Authorization header — it contains reversible credentials.

  4. 4

    Use the Basic Auth decode workflow to extract and inspect credentials from an Authorization header.

Frequently asked questions

Is Basic Auth secure?
Only over HTTPS. The credentials are Base64-encoded (reversible), not encrypted. Over HTTP, anyone on the network can read them. Even over HTTPS, Basic Auth has drawbacks: credentials are sent on every request, logout is unreliable (browser caches), and there is no token expiration.
Basic Auth vs Bearer token?
Bearer tokens are preferred: they expire (limiting compromise window), can be scoped (limited permissions), and don't expose the user's password. Use Basic Auth for simple APIs, internal tools, or API keys. Use Bearer tokens (JWT, OAuth) for production applications.

Workflows that solve this

Convert Ascii85 to Base64
Decode Ascii85 and re-encode as Base64 for wider compatibility.
PIPELINE
Convert Base2048 to Base64
Decode Base2048 (emoji) and re-encode as Base64 for standard transport.
PIPELINE
Convert Base32 to Base64
Decode a Base32-encoded string into raw bytes and re-encode as Base64 for more compact representation.
PIPELINE
Convert Base58 to Base64
Decode Base58 and re-encode as Base64 for standard compatibility.
PIPELINE
Base64 encode then decode round-trip
Encode text to Base64 and decode it back to verify the round-trip preserves the original data.
PIPELINE
Convert Base64 to Base85
Decode Base64 and re-encode as Base85 for compact representation.
PIPELINE
Convert Base64 to Hex
Decode a Base64 string into raw bytes and re-encode it as hexadecimal for inspection or interop.
PIPELINE
Blowfish Encrypt then Base64
Blowfish encrypt then Base64-encode for text-safe transport.
PIPELINE
Decode a Basic Auth credential pair
Decode the Base64 portion of an HTTP Basic Authorization header into username:password.
PIPELINE
DES Encrypt then Base64
DES encrypt then Base64-encode for legacy compatibility.
PIPELINE
Encode a JSON payload for URL transport
Prepare a JSON document for a URL parameter: pretty-print, Base64-encode, then percent-encode — the exact inverse of the nested-parameter decode chain.
PIPELINE
AES encrypt then Base64 encode
Encrypt plaintext with AES and encode the ciphertext as Base64 for text-safe transport.
PIPELINE
Hash content and encode as Base64
Compute a hash of the input and encode the hash digest as Base64 for compact transport.
PIPELINE
Convert Hex to Base64
Decode a hexadecimal string into raw bytes and re-encode it as Base64 for compact transport.
PIPELINE
HMAC Sign then Base64 Encode
Generate HMAC signature then Base64-encode for API auth headers.
PIPELINE
Morse Encode and Base64 Transport
Encode text as Morse code then Base64-encode for digital transport.
PIPELINE
Decode and format a JWT payload
Parse a JWT token, extract its payload, and format the JSON for inspection.
PIPELINE
RC4 Encrypt then Base64
RC4 encrypt then Base64-encode for transport.
PIPELINE
RIPEMD-160 Hash then Base64
Compute RIPEMD-160 hash then Base64-encode for transport.
PIPELINE
Shuffle Text and Base64 Encode
Shuffle text characters then Base64-encode the result.
PIPELINE
Unicode Escape and Base64 Encode
Unicode-escape text then Base64-encode for ASCII-safe transport.
PIPELINE
URL Encode then Base64 Double Encode
URL-encode then Base64-encode for double encoding in API payloads.
PIPELINE
Decode nested URL parameter (Base64 JSON)
Unwrap a URL parameter that carries URL-encoded Base64 JSON into readable, formatted JSON.
PIPELINE
UUencode then Base64
UUencode text then Base64-encode the result for double encoding.
PIPELINE
Generate UUID and Base64 Encode
Generate a UUID then Base64-encode it for compact storage.
PIPELINE

Learn more

Want to understand why?

Related tools