Free online Base64 encoder and decoder. Convert text and data with URL-safe mode and full Unicode support, all in your browser.
Paste the text you want to encode, or paste Base64 text you want to decode.
Select 'Encode' to convert text to Base64, or 'Decode' to convert Base64 back to text. Toggle URL-safe mode if needed.
The conversion happens instantly. Click Copy to grab the result.
Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters. It's commonly used to embed images in CSS/HTML, transmit data in URLs, and encode email attachments.
Standard Base64 uses + and / characters which have special meaning in URLs. URL-safe Base64 replaces these with - and _ so the encoded string can be safely used in URLs and filenames.
Yes. All encoding and decoding happens in your browser using JavaScript's built-in btoa() and atob() functions. No data is transmitted to any server.
This tool is designed for text encoding. For file-to-Base64 conversion (like images), you'd need to read the file as binary data first.
No, it is an encoding. Anyone can decode it without a key. It exists to carry binary data through channels that only accept text.
Base64 turns every three bytes into four characters, so the output is roughly a third larger than the input. That is the cost of being text-safe.
When the value goes into a URL or a filename. Standard Base64 uses plus and slash, which already mean something there, so URL-safe swaps them for minus and underscore.
Usually URL-safe input decoded as standard, or the trailing equals padding was stripped along the way. Check the mode and put the padding back.
Percent encode and decode URLs and query strings, with a breakdown of every part of the address.
Open ToolGenerate MD5, SHA-1, SHA-256 and SHA-512 hashes from any text. All four update as you type, and nothing leaves your browser.
Open ToolConvert between binary, octal, decimal, hexadecimal and any base up to 36, including very large integers.
Open Tool