Ready to convert
Enter input and click Convert// encode & decode base64 β text, images, unicode
Encode text or images to Base64 and decode Base64 back to text or file. Unicode-safe, live preview, one-click copy and instant download.
Ready to convert
Enter input and click ConvertSelect one of the four tabs: TextβBase64, Base64βText, ImageβBase64, or Base64βImage.
Paste text, a Base64 string, or upload an image file. Unicode and emoji are fully supported.
The result appears instantly in the output panel with character count and size stats.
Click Copy to copy the output, or Download to save the decoded image or Base64 as a file.
Base64 is an encoding scheme that converts binary data into a string of ASCII characters using 64 printable symbols (AβZ, aβz, 0β9, +, /). It is commonly used to safely transmit binary data β like images or files β over text-only channels such as email or JSON APIs.
Base64 encodes data in groups of 3 bytes. When the input length is not a multiple of 3, padding characters (=) are added to make the output length a multiple of 4. This is required by the standard but can be stripped for URL-safe use with the "No padding" option.
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces these with - and _ so the encoded string can be safely used in URLs, query parameters, and JWT tokens without percent-encoding.
Yes β all encoding and decoding happens entirely in your browser using JavaScript. No data is sent to any server. Base64 is encoding, not encryption; do not use it to protect sensitive information β it is trivially reversible by anyone.
Standard atob() only handles Latin-1 characters. This tool uses a Unicode-safe decoder that correctly handles UTF-8 text including emoji, CJK characters, and all non-ASCII scripts. If you see garbled output from another tool, paste the Base64 here for a correct result.
A data URI embeds file content directly in HTML or CSS using the format data:image/png;base64,β¦. This lets you inline images without a separate HTTP request. The "Include data URI prefix" option automatically prepends the correct MIME type prefix when encoding images.
Base64 encoding is one of the most widely used data encoding schemes in web development. From embedding images directly in HTML and CSS to encoding API payloads, JWT tokens, and binary attachments in email β Base64 appears everywhere. This free online Base64 encoder and decoder handles text, images, Unicode, and binary data entirely in your browser with no server uploads required.
Base64 takes binary data and represents it using only 64 printable ASCII characters: the uppercase and lowercase Latin alphabet, digits 0β9, and the symbols + and /. Every 3 bytes of input become 4 Base64 characters, resulting in roughly a 33% size increase. Padding with = characters ensures the output length is always a multiple of 4.
JavaScript's built-in btoa() function only handles Latin-1 characters and throws an error on any character outside that range. This tool uses a UTF-8-aware encoding pipeline: the input is first encoded to UTF-8 bytes, then those bytes are Base64-encoded. Decoding reverses the process β Base64 β UTF-8 bytes β original string. This correctly handles emoji, Arabic, Chinese, Vietnamese, and all other Unicode text.
Embedding images as Base64 data URIs removes the need for a separate HTTP request. This is useful for small icons, loading spinners, and background patterns in CSS. The format is data:image/png;base64,{encoded}. Simply upload your image and this tool generates the complete data URI ready to paste into <img src="">, CSS background-image: url(""), or an email template.
Standard Base64 includes + and / which are reserved characters in URLs and must be percent-encoded. URL-safe Base64 (also called Base64URL) replaces these with - and _. This variant is used in JWT tokens, OAuth flows, and any context where the Base64 string appears in a URL or HTTP header. Enable the URL-safe option to automatically apply this substitution.
Base64 encoding is used across many areas of web development. In HTML and CSS, data URIs eliminate HTTP requests for small assets. In HTTP Basic Authentication, credentials are Base64-encoded (though not encrypted). JSON APIs often Base64-encode binary fields like file uploads or cryptographic signatures. JWT tokens use Base64URL for their header and payload sections. Email attachments use Base64 to encode binary files for transmission over SMTP.