ASCII to Base64
Encode ASCII text to a Base64 string for use in HTTP headers, API credentials, Basic Auth tokens, and configuration values. Handles standard ASCII characters and warns when input goes beyond the ASCII range.
Last updated: May 28, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is ASCII to Base64?
ASCII to Base64 encoding converts plain ASCII text — letters, numbers, and standard punctuation — into a Base64 string that is safe to transmit through any text-based channel. This is one of the most common encoding operations in web development, used in HTTP Basic Auth, API key encoding, JWT generation, and data URI construction.
ASCII is the 128-character subset of Unicode covering English letters, digits, and common symbols. Base64 encodes those bytes into a 64-character alphabet (A–Z, a–z, 0–9, +, /) with optional = padding. The result is safe for use in HTTP headers, JSON values, and URL parameters (with URL-safe mode).
How to Use ASCII to Base64
Type or paste your ASCII text into the input field
Click "Encode to Base64" to generate the encoded output
Enable URL-safe mode if the result will appear in a URL or filename
Copy the Base64 string for use in your API request, header, or config
Common Use Cases
- Developers generating the credential block for HTTP Basic Authentication headers (username:password → Base64).
- Engineers encoding API keys or tokens before embedding them in environment variables or config files.
- Frontend developers creating data URIs for small inline text assets.
- Security testers encoding payloads for manual HTTP request crafting in Burp Suite or curl.
- QA engineers verifying Base64 encoding behavior in authentication and API testing workflows.
Example Input and Output
Encoding a username:password pair for an HTTP Basic Auth header — one of the most frequent ASCII to Base64 use cases.
deploy-bot:gh_token_abc123XYZZGVwbG95LWJvdDpnaF90b2tlbl9hYmMxMjNYWVo=Not encryption
Base64 is trivially reversible. Never use it to protect credentials or sensitive data. Always transmit Basic Auth over HTTPS.
Size overhead
Base64 output is approximately 33% larger than the ASCII input due to the 3-bytes-to-4-characters encoding ratio.

