Paste text, get Base64. Any language, any special characters. The encoding runs in your browser so nothing gets uploaded anywhere.
Encode any text to Base64. Private, instant, free.
Encode Now →Base64 takes every 3 bytes of input and converts them into 4 characters from a 64-character alphabet: A-Z (26), a-z (26), 0-9 (10), + and / (2). The equals sign = is used for padding when the input length is not evenly divisible by 3.
Step by step for "Hi":
Result: "Hi" encodes to "SGk="
| Original Text | Base64 Encoded | Size Increase |
|---|---|---|
| Hello World | SGVsbG8gV29ybGQ= | 11 → 16 chars (+45%) |
| user:password | dXNlcjpwYXNzd29yZA== | 13 → 20 chars (+54%) |
| {"key":"value"} | eyJrZXkiOiJ2YWx1ZSJ9 | 15 → 20 chars (+33%) |
| https://example.com | aHR0cHM6Ly9leGFtcGxlLmNvbQ== | 19 → 28 chars (+47%) |
JSON does not support binary data. If you need to include a file, image, or binary blob in a JSON payload, Base64-encode it first. The receiving end decodes it back to binary.
The HTTP Authorization header for Basic auth expects username:password encoded as Base64. This is why you see headers like Authorization: Basic dXNlcjpwYXNzd29yZA==. Remember: this is encoding, not encryption. Always use HTTPS with Basic auth.
You can embed small images or fonts directly in HTML or CSS using data URIs: data:image/png;base64,iVBORw0KGgo.... This eliminates an HTTP request at the cost of a larger HTML file. Good for tiny icons, bad for large images.
Kubernetes secrets, CI/CD variables, and many cloud platforms store sensitive values as Base64. You encode when setting the value, and the system decodes when using it.
btoa("Hello") → "SGVsbG8="import base64; base64.b64encode(b"Hello").decode()echo -n "Hello" | base64[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("Hello"))Note: JavaScript's btoa() does not support UTF-8 characters directly. You need to encode to UTF-8 first. Our browser tool handles this automatically.
This is the most common misunderstanding. Base64 does not protect your data. Anyone can decode it. If you see a password stored as Base64 in a config file, that password is effectively in plain text. For actual security, use proper encryption, then optionally Base64-encode the encrypted output for safe transport.
Different encoding for different situations: URL Encoder for making strings URL-safe, HTML Entity Encoder for escaping HTML special characters, Hash Generator for creating one-way checksums (MD5, SHA-256).