Base64 encode & decode

Encode text to Base64 or decode Base64 back to text, with full UTF-8 support and URL-safe Base64. Turn files and images into Base64 or data URIs, and save Base64 back as a file. Free, and nothing is uploaded.

Runs in your browser. Nothing is uploaded.

File to Base64

Base64 to file

What is Base64?

Base64 turns any data, such as text, images or files, into plain letters, numbers, + and /. It's used to put images straight into HTML or CSS (data URIs), send attachments in email, and pass binary data through JSON and URLs. It is not encryption: anyone can decode it.

Standard or URL-safe?

Standard Base64 uses + and / and pads with =. URL-safe Base64 (used in JWTs and web links) swaps them for - and _ and drops the padding. The decoder here accepts both.

Decoding a JWT? Use the JWT decoder. Need to encode a link? Use URL encode & decode.

Questions

Why is Base64 bigger than the original?

Every 3 bytes become 4 characters, so Base64 is about a third larger.

Does it handle emoji and accents?

Yes. Text is encoded as UTF-8 first, so £, é and emoji survive the round trip.

Are my files uploaded?

No. Encoding and decoding happen in your browser.

More free tools