Base64 Encoder
Encode text or files to Base64 instantly. Full UTF-8 and emoji support, URL-safe output, MIME line wrapping and data URIs — processed entirely in your browser.
What Is Base64 Encoding?
A way to carry binary data through systems that only accept plain text.
Base64 converts any sequence of bytes into a string built from 64 safe characters: A–Z, a–z, 0–9, + and /, with = used as padding. Every 3 bytes of input become 4 characters of output, so encoded data is about 33% larger than the original.
It is used everywhere text-only channels need to carry binary content: email attachments (MIME), data URIs in HTML and CSS, JSON APIs that return files, HTTP Basic authentication headers and JSON Web Tokens.
This encoder turns your text into UTF-8 bytes before encoding, so accented letters, Chinese, Arabic and emoji encode correctly — a common bug with the browser's built-in btoa(), which fails on anything outside Latin-1.
Base64 is not encryption. Anyone can decode it instantly. Never use it to hide passwords or secrets — use it only to transport data safely.
Base64 Variants Supported
Pick the flavour your destination expects.
Standard Base64 (RFC 4648 §4)
The default alphabet with +, / and = padding. Use it for JSON payloads, APIs, configuration files and most programming languages.
URL-safe Base64 (RFC 4648 §5)
Replaces + with - and / with _, and drops the padding. Safe in URLs, query strings, filenames and cookies — it is the format used by JWTs.
MIME (RFC 2045)
Standard Base64 broken into lines of at most 76 characters with CRLF line endings, as required for email attachments and some PEM-style formats.
Data URI (RFC 2397)
Adds a data:image/png;base64, style prefix so the result can be pasted straight into an <img src>, a CSS url() or an HTML attribute. The file's MIME type is detected automatically.
How to Use the Base64 Encoder
Get your result in under ten seconds.
Enter text or drop a file
Type or paste text into the input, or switch to File mode and drop an image, PDF, font or any other file.
Choose options
Toggle URL-safe output, 76-character line wrapping or a data URI prefix. The result updates instantly.
Copy or download
Copy the Base64 string to your clipboard or download it as a .txt file. Large results are kept in full.
Why Use the Base64 Encoder on Developers Web Tools
Fast, accurate and private — built for developers.
Private by design
Encoding runs locally in JavaScript. Your text and files are never uploaded to a server.
Real UTF-8 support
Emoji, accents and non-Latin scripts encode correctly — no more btoa() “character out of range” errors.
Files up to 25 MB
Encode images, PDFs and fonts straight to Base64 or a ready-to-use data URI.
Fast on big input
Chunked encoding and a smart preview keep the page responsive even with megabytes of data.
URL-safe & MIME
Switch to the URL-safe alphabet for tokens and URLs, or wrap lines at 76 characters for email.
Size insight
See the input size, output length and the exact size overhead of every conversion.
Frequently Asked Questions
No. Base64 is an encoding, not encryption. It has no key and anyone can reverse it in a second with a decoder. Use it to transport data safely through text-only systems, never to protect secrets.
Base64 represents every 3 bytes with 4 characters, so output is about 33% larger (plus a little more if you wrap lines). That overhead is the price of using only text-safe characters.
Yes. Text is first converted to UTF-8 bytes, then encoded, so “héllo 👋” or “日本語” produce the same Base64 as Python, Node.js, Java or the base64 command-line tool.
A variant defined in RFC 4648 that uses - and _ instead of + and /, and usually omits = padding, so the string can be used in URLs and filenames without percent-encoding. JWTs use this format.
Switch to File mode, drop the image and tick Data URI. Paste the result into <img src="…"> or background-image: url("…"). Data URIs suit small images such as icons; large images are better served as normal files.
No. Files are read with the browser's FileReader API and encoded on your device. Nothing is sent over the network, and nothing is saved when you close the tab.
Files up to 25 MB are supported to keep your browser responsive. Very long text switches from live encoding to the Encode button, and output longer than 500,000 characters is previewed — Copy and Download always contain the full result.