Text to Base64 Encoder
Encode any text as Base64. Base64 is widely used to safely transmit binary data as text — in emails, data URLs, JWTs, and HTTP Basic Authentication.
Common Values
| Input | Base64 |
|---|---|
| Hello | SGVsbG8= |
| World | V29ybGQ= |
| hello world | aGVsbG8gd29ybGQ= |
| test | dGVzdA== |
| admin | YWRtaW4= |
| password | cGFzc3dvcmQ= |
| foo | Zm9v |
| bar | YmFy |
How It Works
Base64 converts groups of 3 bytes (24 bits) into 4 printable ASCII characters. The 64 characters used are A-Z, a-z, 0-9, +, and /. If the input isn't a multiple of 3 bytes, "=" padding is added. For example, "Hello" in Base64 is "SGVsbG8=" — the "=" indicates one byte of padding.
Worked Examples
| Text | Base64 |
|---|---|
| Hello | SGVsbG8= |
| World | V29ybGQ= |
| foo | Zm9v |
| bar | YmFy |
| test | dGVzdA== |
| abc | YWJj |
Related Conversions
Frequently Asked Questions
- What is Base64 encoding?
Base64 is an encoding scheme that represents binary data as a sequence of printable ASCII characters. It uses 64 characters: A-Z, a-z, 0-9, +, /.
- Why is Base64 used?
Base64 safely encodes binary data for contexts that only handle text, such as email attachments (MIME), data URLs, JSON, and HTTP headers.
- Does Base64 compress data?
No. Base64 expands data by about 33% — every 3 bytes become 4 Base64 characters. It encodes, not compresses.
- Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it instantly. It should never be used to hide sensitive data.