Base64 Encode & Decode
Encode text to Base64 or decode Base64 to text.
How it works
- 1
Enter text or Base64
Type or paste text to encode, or paste a Base64 string to decode.
- 2
See instant results
The conversion happens in real-time as you type.
- 3
Copy output
Click the copy button to copy the result to your clipboard.
Common use cases
Encode text
Hello, World!
Decode Base64
VXRpbGlpZnkuY29t
About This Tool
Convert text strings to Base64 encoding or decode Base64 back to plain text. Supports UTF-8 text and provides instant results as you type.
Common use cases: encoding data in URLs, embedding images in CSS, handling authentication tokens, and transmitting binary data as text.
All processing works entirely client-side for privacy.
Base64 is a binary-to-text encoding scheme defined in RFC 4648. It converts binary data into an ASCII string using a 64-character alphabet: A-Z, a-z, 0-9, +, and /. The = character is used for padding at the end. Every three bytes of input become four Base64 characters, which means Base64-encoded data is about 33% larger than the original binary.
In web development, Base64 is everywhere. The HTTP Authorization header for Basic Auth sends a Base64-encoded string of username:password. Data URLs embed small images directly in HTML or CSS using Base64 (e.g., data:image/png;base64,iVBOR...). JSON Web Tokens encode their header and payload as Base64URL (a URL-safe variant that replaces + with - and / with _). Email attachments are transmitted as Base64 via MIME.
This tool handles both standard Base64 and UTF-8 text correctly. When encoding, it first converts the input string to UTF-8 bytes using the TextEncoder API, then encodes those bytes as Base64. When decoding, it reverses the process. This means you can safely encode and decode text in any language, including emoji, CJK characters, and other non-ASCII content.
Real-world examples of when to use this tool: decoding a Base64-encoded Basic Auth header to verify credentials, encoding a small SVG as a data URL for an inline icon, decoding the payload of a JWT to inspect claims, and converting a Base64-encoded API response back to readable text. If you work with REST APIs regularly, you will encounter Base64 in authentication headers, response bodies, and file upload endpoints.
Important note: Base64 is encoding, not encryption. It is trivially reversible and provides no security. Never use Base64 to protect sensitive data -- use proper encryption (AES, RSA) instead. Base64 is designed for data transport, not data protection.
More examples
Examples
Encode text
Input
Hello, World!
Output
SGVsbG8sIFdvcmxkIQ==
Decode Base64
Input
VXRpbGlpZnkuY29t
Output
Utiliify.com
Frequently Asked Questions
- What is Base64 encoding?
- Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format using 64 printable characters (A-Z, a-z, 0-9, +, /). It is defined in RFC 4648.
- When should I use Base64?
- Base64 is commonly used to embed images in HTML/CSS (data URLs), encode email attachments, transmit binary data in JSON APIs, handle authentication headers, and encode data for URLs.
- Is Base64 encryption?
- No. Base64 is an encoding scheme, not encryption. It can be easily decoded by anyone and should not be used to protect sensitive data. Use proper encryption algorithms like AES for security.
- Does Base64 encoding increase the data size?
- Yes. Base64-encoded data is approximately 33% larger than the original binary data. Every 3 bytes of input become 4 Base64 characters. This overhead is the trade-off for representing binary data as text.
- What is the difference between Base64 and Base64URL?
- Base64URL replaces + with - and / with _ and omits padding (=). It is used in URLs and filenames where the standard Base64 characters would cause problems. JWTs use Base64URL encoding.
- Can I encode non-English text with Base64?
- Yes. This tool handles UTF-8 text, so you can encode and decode text in any language including Chinese, Japanese, Arabic, and emoji. The text is first converted to UTF-8 bytes before encoding.
- How do I embed an image as a Base64 data URL?
- Use our Base64 Image Encoder tool to convert an image file to a data URL. The resulting string can be used directly in HTML img tags or CSS background-image properties.