Loading Base64 tool...
Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters so it can be safely transmitted over text-based protocols like HTTP, email, and JSON. Use our free tool to encode text to Base64 or decode Base64 back to readable text. It supports UTF-8 (including emojis and international characters), handles file encoding via drag-and-drop, and runs entirely in your browser—no data is ever uploaded.
Enter text in the top field to encode it to Base64, or paste Base64 in the bottom field to decode it
The counterpart field updates live as you type—edit either side anytime
Click Copy to copy the encoded or decoded result to your clipboard
Drag and drop a file onto the tool to generate a Base64 data URL for embedding
Base64 is an encoding scheme that converts binary data into a set of 64 ASCII characters (A–Z, a–z, 0–9, +, and /). It takes every 3 bytes of input and represents them as 4 characters. This makes binary data safe to transmit over text-only channels like email, JSON, or URLs.
No. Base64 is an encoding, not encryption. It provides zero security—anyone can decode Base64 instantly. If you need to protect data, use a real encryption algorithm like AES. Base64 is only for data format compatibility, not confidentiality.
Base64 uses 4 characters to represent every 3 bytes of input (4/3 ratio). This means the encoded output is approximately 33% larger than the original binary data. For example, 300 bytes of input become 400 characters of Base64.
Our tool handles this automatically. The browser TextEncoder API converts your text (including emojis, Chinese, Arabic, etc.) to UTF-8 bytes, which are then encoded to Base64. Standard btoa() only handles Latin1, so we use the UTF-8-safe approach for full Unicode support.
Base64 output must be a multiple of 4 characters. If the input length is not divisible by 3, padding (=) characters are added to the end. One = means the last group encodes 2 bytes; two = means it encodes 1 byte. Our decoder handles both padded and unpadded input.
Yes. Drag and drop any file onto our tool and it will read it as a Base64 data URL (e.g., data:image/png;base64,...). This is useful for embedding images in HTML/CSS, creating inline attachments, or generating data URIs.