Skip to tool

Free online tool

Base64 Encoder/Decoder

Your input never leaves your browser.

What Base64 is for

Base64 turns arbitrary bytes into plain text made only of letters, digits, and a few symbols, so binary data can safely travel through systems built for text, such as email or JSON. It is an encoding, not encryption: anyone can decode it back to the original, so it does not hide or protect data.

Worked example

Encoding "Hello, World!" gives SGVsbG8sIFdvcmxkIQ==. Decoding that string returns the original text: Hello, World!.

Standard and URL-safe

Standard Base64 uses "+" and "/" in its alphabet and pads the output with "=" characters to a multiple of four. Those characters have special meaning inside a URL, so a URL-safe variant substitutes "-" and "_" for them and normally leaves out the padding. Choose URL-safe when the encoded text is going into a link or filename, and standard otherwise.

Text is handled as UTF-8

Before encoding, your text is converted to its UTF-8 bytes, and after decoding those bytes are converted back to text the same way. This matters for anything beyond basic Latin letters and digits: emoji, accented letters, and non-Latin scripts all round-trip correctly, which a naive character-by-character approach would get wrong or fail on outright.

Invalid input

If you paste something that is not valid Base64, such as text containing characters outside its alphabet or with the wrong length, the tool reports a clear error rather than guessing at a partial or garbled result.

Examples

  • Input: Encode: "Hello, World!"

    Output: SGVsbG8sIFdvcmxkIQ==

Related tools