← Back to all tools

Base64 Encode/Decode

Convert UTF-8 text or file bytes to and from Base64.

Padding and wrapping apply to encoded output.

Updates locally as you type.

Base64 is encoding, not encryption. Conversion runs in your browser.

Standard Base64

Uses + and / for encoding, with = padding for proper decoding.

URL-safe Base64

Uses - and _ instead of + and /. Common in URLs and filenames.

Text or bytes

UTF-8 text and binary files are different. This tool works with both text and file bytes.

Base64 is encoding, not encryption. No conversion data is sent to a server.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding. It turns bytes into ASCII text so they can travel in text channels. It does not encrypt or compress them, and anyone can reverse it.

What does padding do?

Include padding adds = so an encoded result is a multiple of 4 characters. One = means two bytes were left in the last group. Two = means one byte was left. Decode also accepts a missing pad when the length matches that group. A remainder of one character is invalid. Padding characters are allowed only at the end.

Is URL-safe Base64?

Base64URL uses - and _ instead of + and /. This page does not mix the alphabets. In Standard Base64, + is a character and is not a space. Space, tab and line breaks are the only whitespace ignored while decoding. Other characters stop the decode.

Why might decoded bytes not be readable text?

Base64 carries bytes. A valid decode can include NUL and sequences that are not UTF-8. Those bytes stay available for download and are not replaced with another character. Text you type is encoded as UTF-8, including its spaces and line breaks.