Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 to text
Free Online Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to plain text with our free online Base64 converter. Base64 is a binary-to-text encoding scheme that converts data into an ASCII string format, making it safe to transmit through text-based protocols and embed in documents.
Base64 encoding is essential for web developers, API developers, and anyone working with data that needs to be transmitted over text-only channels. It uses a 64-character alphabet (A-Z, a-z, 0-9, +, /) to represent binary data, with = used for padding when needed.
Our tool handles Unicode text properly, supporting characters from any language. All encoding and decoding happens locally in your browser - your data is never sent to any server, ensuring privacy for sensitive information.
Common Uses for Base64
Data URLs in HTML/CSS
Embed images, fonts, and other assets directly in HTML or CSS files without external file references.
API Data Transfer
Send binary data (images, files, encrypted data) through JSON APIs that only support text.
Email Attachments
MIME encoding uses Base64 to send file attachments through the text-based email protocol.
Basic Authentication
HTTP Basic Auth encodes username:password in Base64 for the Authorization header.
Database Storage
Store binary data in text-only database columns or configuration files.
URL-Safe Data
Encode data for inclusion in URLs where special characters might cause issues.
How to Use Base64 Encoder/Decoder
Choose Encode or Decode
Select "Encode" to convert text to Base64, or "Decode" to convert Base64 back to text.
Enter Your Input
Paste or type your text (for encoding) or Base64 string (for decoding) into the input field.
Click Convert
Press the Encode or Decode button to process your input instantly.
Copy or Swap
Copy the result to clipboard, or use the swap button to reverse the operation.
Frequently Asked Questions
What is Base64 encoding?
Base64 is a method of encoding binary data into ASCII text using 64 printable characters. It ensures data can be safely transmitted through text-only channels without corruption.
Is Base64 encryption?
No, Base64 is encoding, not encryption. It provides no security - anyone can decode Base64. It's meant for data transmission compatibility, not secrecy.
Why does Base64 make data larger?
Base64 increases size by about 33% because it represents 3 bytes of binary data using 4 ASCII characters. The trade-off is compatibility with text-only systems.
What does the = at the end mean?
The = character is padding. Base64 works in groups of 3 bytes. If input isn't divisible by 3, = characters pad the output to complete the final group.
Can Base64 encode any data?
Yes, Base64 can encode any binary data including images, executables, and text. However, this tool is optimized for text. For files, use a file-to-Base64 converter.
What is URL-safe Base64?
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces these with - and _ to avoid conflicts. This tool uses standard Base64.