Base64 Encoder

Encode and decode Base64 strings instantly in your browser.

Encode & decodeUnicode supportClient-side only

① Paste text to encode ② Or paste Base64 to decode ③ Copy the result

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is widely used to embed images as data URIs in HTML and CSS, encode JWT tokens, transmit binary data in JSON APIs, encode PEM certificates, and handle MIME email attachments. In JavaScript, use btoa() to encode and atob() to decode — for Unicode text you need the encodeURIComponent wrapper, which this tool handles automatically. Note: Base64 is encoding, not encryption — anyone can decode it without a key.

Frequently asked questions

Base64 is a binary-to-text encoding that converts binary data to a string of 64 ASCII characters (A-Z, a-z, 0-9, +, /). It encodes every 3 bytes of binary data into 4 characters, resulting in a ~33% size increase. The "=" character is used as padding at the end.
Base64 is used to: embed images in HTML/CSS as data URIs, encode binary attachments in emails (MIME), transmit binary data in JSON APIs, encode SSL/TLS certificates in PEM format, and store binary data in text-based databases or config files.
Base64 works by taking 3 bytes (24 bits) of input data at a time, splitting them into four 6-bit groups, and mapping each group to one of 64 printable characters using a lookup table. If the input is not a multiple of 3 bytes, padding characters (=) are added.
No. Base64 is encoding, not encryption. It transforms data into a different representation but does not protect it. Anyone can decode Base64 without a key. For security, use proper encryption (AES, RSA). Base64 is often confused with encryption because the output looks random, but it is trivially reversible.
Padding characters (=) are added to make the encoded string a multiple of 4 characters. If the input is a multiple of 3 bytes, no padding is needed. 1 extra byte → two padding characters (==). 2 extra bytes → one padding character (=).
Standard Base64 uses + and / which are special characters in URLs. Base64URL replaces + with - and / with _ for safe use in URLs and filenames. JWT tokens use Base64URL encoding. This tool uses standard Base64.
This tool uses encodeURIComponent/decodeURIComponent around atob/btoa to handle Unicode text correctly. Standard btoa() in JavaScript only handles ASCII and will throw an error with non-ASCII characters. The tool handles all Unicode text including emoji, CJK, Arabic, Cyrillic and other scripts.

Explore Our Network