Base64 Encode/Decode

Encode text to Base64 or decode a Base64 string instantly. Handles UTF-8 text including accents and emoji.

Helpful?
Input: 0 chars
Output: 0 chars

Base64 turns any bytes into text using 64 safe characters (A–Z, a–z, 0–9, + and /), so binary data can travel through systems built for plain text: email attachments, JSON payloads, data URIs and HTTP headers. Type or paste text on the left to encode it; paste a Base64 string and press the swap button to decode it.

Example

Hello, World! encodes to SGVsbG8sIFdvcmxkIQ==. The two = signs are padding: Base64 works in groups of three bytes, and the trailing = marks how many bytes the last group was short.

UTF-8 first, then Base64

Base64 encodes bytes, not characters. This tool converts your text to UTF-8 before encoding, so accented letters and emoji round-trip correctly — café becomes Y2Fmw6k=, not an error. When decoding, the bytes are read back as UTF-8.

Base64 is not encryption

Anyone can decode Base64; it hides nothing. Use it to transport data, never to protect it. For integrity and authenticity use an HMAC; for secrecy use real encryption.

Need the whole story — the alphabet table, URL-safe Base64 and the size overhead? Read What is Base64 encoding?. To embed an image, use image to Base64 or turn a string back into a picture with Base64 to image.

Frequently Asked Questions

Base64 represents binary data as text using 64 characters: A–Z, a–z, 0–9, + and /. Every 3 bytes become 4 characters, which is why encoded data is about 33% larger than the original.

No. Base64 is a reversible encoding with no key; anyone can decode it. It exists to move data safely through text-only channels, not to keep it secret.

Padding. Base64 processes input in 3-byte groups. If the final group has only 1 or 2 bytes, the output is padded with == or = so its length is a multiple of 4.

Yes. Text is converted to UTF-8 bytes before encoding and decoded back as UTF-8, so characters outside ASCII survive the round trip.

A variant that replaces + with - and / with _ (and usually drops the = padding) so the result can sit in a URL or a JWT without escaping. This tool produces standard Base64; convert the two characters if you need the URL-safe form.

Paste the string into the input, press the swap button to switch to 'Decode from Base64', and the decoded text appears instantly. Invalid characters or a wrong length produce an error.
Share this tool