Free Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 strings instantly. Full UTF-8 support for international characters and emojis.

About Base64 Encoding

Base64 is a binary-to-text encoding scheme that represents binary data in ASCII string format. It's commonly used for encoding data that needs to be stored or transferred over media designed for text. Base64 encoding increases data size by approximately 33%.

Common Use Cases

Data URLs
Embed images directly in HTML/CSS using Base64
Email Attachments
MIME encoding for email attachments
API Authentication
HTTP Basic Auth uses Base64 encoding
JSON Web Tokens
JWTs use Base64URL encoding for payload

How to Use the Base64 Encoder/Decoder

Enter Your Text or Base64 String

Paste or type your plain text in the input field to encode it, or paste a Base64-encoded string to decode it. The tool auto-detects whether you want to encode or decode.

Select Encoding Mode

Choose between standard Base64 encoding or URL-safe Base64 (Base64URL) which replaces + with - and / with _ for safe use in URLs and filenames.

Click Encode or Decode

Click the appropriate button to transform your data. The result appears instantly in the output area with full UTF-8 support for international characters and emojis.

Copy the Result

Use the copy button to copy the encoded or decoded result to your clipboard. You can also download the result as a text file for later use.

Pro tip: Your data is processed entirely in your browser. Nothing is sent to any server, ensuring complete privacy.

Understanding Base64 Encoding

Base64 encoding is a method of converting binary data into ASCII text format. It uses 64 characters (A-Z, a-z, 0-9, +, /) to represent binary data, making it safe for transmission over text-based protocols. This encoding is widely used in web development for embedding images, sending data via APIs, and encoding authentication credentials.

When to Use Base64

  • Data URLs: Embed small images directly in HTML or CSS
  • API Communication: Send binary data in JSON payloads
  • Email: Encode attachments for MIME transmission
  • Authentication: HTTP Basic Auth header encoding
  • Storage: Store binary data in text-only databases
Continue with...

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's used to encode binary data when you need to store or transfer it over media designed for text, like email or JSON.

Why does Base64 encoding increase file size?

Base64 encoding increases data size by approximately 33% because it represents every 3 bytes of binary data as 4 ASCII characters. This overhead is the trade-off for being able to safely transmit binary data as text.

Is Base64 encryption?

No, Base64 is NOT encryption. It's an encoding scheme that can be easily reversed by anyone. It provides no security whatsoever. Never use Base64 to protect sensitive data - use proper encryption instead.

What is Base64URL encoding?

Base64URL is a URL-safe variant of Base64 that replaces + with - and / with _. It also removes padding (=). It's commonly used in URLs and file names where standard Base64 characters would cause issues.

Can I encode files with Base64?

Yes, any file can be converted to Base64. This is commonly used for embedding images in HTML/CSS (data URLs), sending files via JSON APIs, or storing binary data in text-based formats. However, remember the 33% size increase.