Encodes strings into Base64 format, converting raw data into an ASCII character sequence (A-Z, a-z, 0-9, +, /). Commonly used for data transmission and storage
The Base64 Encoder tool converts strings or binary data into ASCII character sequences composed of A-Z, a-z, 0-9, +, and /. Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable characters, widely used in data transmission, storage, and email systems.
This tool can encode any text or binary data into Base64 format. The encoded output consists only of printable ASCII characters, preventing parsing errors caused by special characters during network transmission. The result is typically padded with = signs to ensure the output length is a multiple of 4.
Base64 encoding divides every 3 bytes (24 bits) of binary data into 4 groups of 6 bits each, then maps each 6-bit value to a character from a 64-character lookup table. Since a 6-bit binary number ranges from 0 to 63, it corresponds to exactly 64 printable characters. If the input byte count is not a multiple of 3, padding with = signs is applied.
The process works as follows: input data is first converted to a UTF-8 byte sequence. Every 3 bytes are concatenated into 24 bits, then split into 4 groups of 6 bits. Each group becomes a numeric index into the Base64 alphabet (ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/). If 1 byte remains, two equals signs are appended; if 2 bytes remain, one equals sign is appended.
data:image/png;base64,...) to reduce HTTP requests+ and /, which have special meaning in URLs. URL-safe Base64 variants replace + with - and / with _, and strip trailing equals signs.Input (raw string):
Hello 9Yun AI Tools
Output (Base64 encoded):
SGVsbG8gOVl1biBBSSBUb29scw==
Base64 Encoder is the reverse operation of Base64 Decoder. If you need to restore Base64-encoded data, use the Base64 Decoder tool. As fellow encoding tools, URL Encoder and URL Decoder are commonly used alongside Base64 in web development. When understanding encoding fundamentals, the ASCII Lookup table provides the character-to-byte reference mapping.