Paste or type text
Enter plain text to encode, or Base64 to decode.
Encode and decode Base64 text and images. Learn how Base64 encoding works with text, data URIs, and HTML/CSS examples. Runs locally in your browser.
Loading tool…
Follow these steps for a clear answer.
Enter plain text to encode, or Base64 to decode.
Run the action you need; work stays in your browser.
Click Copy next to Result to copy the converted string.
Version 1.0.0 · Last reviewed 2026-07-28
encode: UTF-8 bytes → Base64; decode: Base64 → UTF-8 bytesBase64 encoding converts binary data into ASCII text using 64 printable characters (A–Z, a–z, 0–9, +, /). It is commonly used to embed images in HTML/CSS, encode credentials, and transmit binary data over text-only protocols.
Input text:
The basket is full of grapes.
Encoding process:
Output:
VGhlIGJhc2tldCBpcyBmdWxsIG9mIGdyYXBlcy4=
Images can be embedded directly in HTML or CSS as data URIs:
data:image/jpeg;base64,/9j/4AAQSkZJRg...
| Part | Meaning |
|---|---|
data: |
Data URI scheme |
image/jpeg |
MIME type |
base64, |
Encoding method |
/9j/4AAQ... |
Encoded image data |
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRg..." alt="Photo">
body {
background-image: url('data:image/jpeg;base64,/9j/4AAQSkZJRg...');
}
| Use case | Example |
|---|---|
| Embed small images inline | Icons, tiny graphics |
| Email attachments | MIME encoding |
| API authentication | Basic auth headers |
| Data transmission | JSON with binary payloads |
Key distinctions behind the tool.
No. Base64 is encoding, not encryption. Anyone can decode it.
No. Use data URIs for small icons only. Large images should be separate files for caching and performance.
Paste the encoded string into the decoder tool, or use atob() in JavaScript.
Base64 output is padded with = characters so the encoded length is a multiple of 4.