Base64 Encoder

Encode/decode Base64, Hex, Binary

Input Text0 chars
Output BASE640 chars

About BASE64

• Base64 is used to encode binary data as ASCII text

• Commonly used in email attachments, data URLs, and JSON web tokens

• Valid Base64 contains only A-Z, a-z, 0-9, +, / characters and padding (=)

About Base64 Encoder & Decoder

1What is it?

Encode text to Base64 format or decode Base64 strings back to readable text. This essential developer tool also shows hexadecimal and binary representations of your data. Base64 encoding is commonly used for embedding binary data in text-based formats like JSON, HTML, or emails.

2Use Cases

  • Encode data for RESTful API requests
  • Embed images in CSS using data URIs
  • Create HTTP Basic Authentication headers
  • Encode email attachments (MIME)
  • Store binary data in JSON or XML
  • Debug encoded strings from APIs
  • Create Data URLs for inline resources

3Examples

Encode to Base64

Input

Hello World!

Output

SGVsbG8gV29ybGQh

Decode from Base64

Input

SGVsbG8gV29ybGQh

Output

Hello World!

?Frequently Asked Questions

Does Base64 encoding encrypt my data?

No! Base64 is NOT encryption. It's just a way to represent binary data as text. Anyone can decode Base64 - it provides no security. For security, use proper encryption tools.

Does it handle Unicode characters?

Yes, the tool properly encodes and decodes UTF-8 characters including emojis, Chinese characters, Arabic, and other non-ASCII text. It uses proper UTF-8 encoding before Base64 conversion.

Why is my Base64 string longer than the original?

Base64 encoding increases size by approximately 33%. This is because it converts every 3 bytes of binary data into 4 ASCII characters. This overhead is the trade-off for text-safe encoding.

What's the difference between Base64 and URL-safe Base64?

Standard Base64 uses +, /, and = characters which have special meaning in URLs. URL-safe Base64 replaces + with -, / with _, and may omit padding (=). Use URL-safe when the encoded string appears in URLs.

Can I encode files to Base64?

This tool encodes text. For file encoding, you'll need a file-to-Base64 converter. However, you can paste the content of text files here for encoding.