How to Encode or Decode Base64
Paste plain text to encode it to Base64, or paste a Base64 string to decode it back to plain text.
Choose the appropriate operation. The result appears instantly below.
Click Copy to copy the encoded or decoded result to your clipboard.
What Is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters using 64 printable characters (A-Z, a-z, 0-9, + and /). It was designed to safely transmit binary data through text-only systems like email. Base64 increases data size by approximately 33% but guarantees data will not be corrupted during transmission. It is not encryption — Base64 is trivially reversible and provides no security.
Where Is Base64 Used?
Web developers embed small images in HTML and CSS using Base64 data URIs. API developers encode binary data in JSON payloads. Email systems encode attachments using Base64 for SMTP transmission. JWT tokens use Base64URL encoding for header and payload segments. Developers encode API keys in HTTP Basic Authentication headers.
Frequently Asked Questions
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode Base64 instantly. Never use it to protect sensitive data.
Why does Base64 make data larger?
Base64 converts every 3 bytes into 4 ASCII characters, resulting in ~33% size increase. This trade-off ensures safe text-based transmission.
What is Base64URL?
Base64URL replaces + with - and / with _ for use in URLs and filenames. It is commonly used in JWT tokens.
Can I encode files or images?
This tool encodes text. To Base64-encode a file, you need to read it as binary data first using programming language libraries.