Base64 Encode
Encode any text or data to Base64 format instantly — free, fast, runs in your browser.
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, + and /. The name "Base64" comes from the fact that 64 is the largest power of 2 that can be represented using only printable ASCII characters.
Base64 encoding is widely used across software development and internet infrastructure. It is used to embed images directly in HTML and CSS as data URIs, encode binary email attachments in MIME format, transmit binary data through JSON APIs that only support text, store credentials in HTTP Basic Authentication headers, and encode cryptographic keys and certificates in PEM format.
The encoding works by taking 3 bytes (24 bits) of input and splitting them into four 6-bit groups. Each 6-bit value is mapped to one of the 64 Base64 characters. If the input length is not a multiple of 3, padding characters (=) are appended to make the output length a multiple of 4.
URL-safe Base64 replaces + with - and / with _ to make the encoded string safe for use in URLs and filenames without percent-encoding. This variant is commonly used in JWT tokens, OAuth flows, and URL parameters.
This free Base64 encoder runs entirely in your browser — your data is never sent to any server. It supports Unicode text including emojis and non-Latin characters by using UTF-8 encoding internally.