Base64 Encode & Decode
Encode text to Base64 or decode Base64 back to text. Instant, free, private.
What Is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters: A-Z, a-z, 0-9, +, and /, with = for padding. It was originally designed to transmit binary data through systems that only support text, such as email (MIME) and URLs.
Every 3 bytes of input become 4 Base64 characters, making the encoded output roughly 33% larger than the original. Despite this overhead, Base64 remains the standard for embedding binary content in text-based formats because it is universally supported and easy to implement.
The encoding is defined in RFC 4648 and is used across virtually every programming language, web framework, and protocol that handles binary-to-text conversion.
How to Use This Tool
- Choose a mode — click Encode to convert text to Base64, or Decode to convert Base64 back to text.
- Enter your input — type or paste into the left textarea. Conversion happens in real time.
- Copy the result — click the Copy button or select the text in the output area.
- Swap directions — click Swap to move the output into the input and flip the mode automatically.
The tool supports full Unicode including Cyrillic, Chinese, Japanese, Korean, emoji, and special characters. All processing happens in your browser — nothing is sent to a server.
Common Use Cases
API & JWT Tokens
Decode JWT payloads to inspect claims, or encode API credentials for HTTP Basic Authentication headers.
Data URIs
Embed small images, fonts, or files directly in HTML and CSS using data: URIs with Base64 encoding.
Email & MIME
Email attachments and non-ASCII headers are encoded in Base64 per the MIME standard (RFC 2045).
Configuration Files
Kubernetes Secrets, SSH keys, and TLS certificates frequently store binary data as Base64-encoded strings in YAML or JSON configs.
Frequently Asked Questions
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into a sequence of printable ASCII characters. It uses 64 characters (A-Z, a-z, 0-9, +, /) plus = for padding. It is defined in RFC 4648.
Is Base64 the same as encryption?
No. Base64 is encoding, not encryption. It provides no security. Anyone can decode a Base64 string. Use proper encryption (AES, RSA) if you need confidentiality.
Does this tool support Unicode and emoji?
Yes. This tool uses UTF-8 encoding internally, so it correctly handles Cyrillic, Chinese, Japanese, Korean, Arabic, emoji, and any other Unicode characters.
Is my data sent to a server?
No. All encoding and decoding happens 100% in your browser using JavaScript. No data is transmitted anywhere. Your text never leaves your device.
Why does Base64 output look longer than the input?
Base64 converts every 3 bytes into 4 characters, so the output is roughly 33% larger. This overhead is the trade-off for safe transport through text-only channels.
What is the maximum input size?
There is no hard limit. Inputs over 1 MB may slow your browser. For very large files, consider command-line tools: base64 on macOS/Linux or certutil on Windows.