Skip to main content
Utulio
Developer Tools

Base64 Encoder & Decoder

Encode any text to Base64 or decode Base64 back to text instantly. UTF-8 safe — handles emojis and non-Latin characters correctly. All processing happens in your browser.

16 characters

24 characters

🔒 Your data never leaves your browser. All encoding and decoding happens locally.

When Do You Need Base64?

Base64 encoding is necessary when you need to transmit binary data through systems designed to handle only text. Common use cases include embedding images in HTML/CSS (data URLs), encoding credentials in HTTP Basic Auth headers, encoding binary content in JSON payloads, and encoding keys and tokens in JWT (JSON Web Tokens).

If you've ever looked at a JWT token, it looks like three Base64 segments separated by dots. Decoding the middle segment reveals the payload — the actual claims stored in the token. This is why it's important to remember that Base64 is not encryption.

This tool correctly handles UTF-8 characters — including emojis, Chinese, Arabic, and other non-ASCII text — using the proper encoding approach that avoids the common character corruption bug in simple btoa() implementations.

Base64 FAQs

What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters. It converts every 3 bytes of binary data into 4 printable characters. Base64 is widely used in email attachments, data URLs, HTTP Basic Auth, and JSON Web Tokens (JWTs).
Is Base64 encryption?
No — Base64 is encoding, not encryption. It is easily reversible by anyone without a key. Do not use Base64 to "hide" sensitive data. It is used purely for data transport compatibility, not security. If you need to protect data, use proper encryption algorithms like AES.
Why does Base64 make text longer?
Base64 encodes every 3 bytes into 4 characters, resulting in approximately 33% size increase. This overhead is the trade-off for converting any binary data into safe printable ASCII text that can be transmitted across systems that only handle text.
Can I encode images?
Yes — images can be Base64 encoded and embedded directly in HTML/CSS as data URLs: <img src="data:image/png;base64,{encoded}">. This eliminates a network request for small images. However, this tool currently handles text encoding/decoding only.
Is my data safe here?
Yes. This tool runs entirely in your browser. Your text is never sent to any server — the encoding and decoding happen locally using JavaScript's built-in btoa() and atob() functions, with UTF-8 handling for international characters.
What characters does Base64 use?
Standard Base64 uses: A-Z (26), a-z (26), 0-9 (10), + and / (2) = 64 characters total, plus = for padding. URL-safe Base64 replaces + with - and / with _ to avoid issues in URLs and file names.

Related Tools