Tools

Base64 Encoder/Decoder

Encode text to Base64 or decode a Base64 string.

How to Calculate

Base64 is an encoding scheme that converts binary data into an ASCII string. Common use cases: • Email attachment transfer (MIME) • Data URIs (embedding images directly in HTML/CSS) • Passing API authentication tokens • Transmitting binary data over text-based protocols Base64 uses 64 characters: A-Z, a-z, 0-9, +, / and uses = for padding.

Example

Input: Hello, World! Encoded: SGVsbG8sIFdvcmxkIQ== Input: 안녕하세요 Encoded: 7JWI64WV7ZWY7IS47JqU

FAQ

Is Base64 encoding the same as encryption?
No. Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string without a key. For protecting sensitive data, use encryption algorithms like AES or RSA.
How much larger does Base64 make the data?
Base64 increases size by approximately 33%. Every 3 bytes of input become 4 Base64 characters. For example, a 1 MB file becomes roughly 1.33 MB after encoding.
Why does Base64 decoding fail?
Common causes: (1) the string contains characters outside A-Z, a-z, 0-9, +, /, =; (2) incorrect padding (=); (3) attempting to decode URL-safe Base64 (which uses - and _ instead of + and /) with a standard decoder.
What is the difference between Base64 and Base64URL?
Base64URL replaces + with - and / with _, and omits padding (=). This makes it safe for use in URLs and filenames. It is commonly used in JWT tokens.

Related Tools