ManyTools

Base64 Converter: Encode and Decode Text

Turn text into Base64 or Base64 back into text, with UTF-8 handled correctly, a URL-safe option, and a plain error message when the input is not valid Base64.

Last updated: September 30, 2026How this is calculated →

Base64 writes any bytes using 64 safe characters: A to Z, a to z, 0 to 9, plus and slash. Every 3 bytes become 4 characters, and = signs pad the end to a multiple of 4. Hello, World! is 13 bytes of text, so it encodes to 20 characters: SGVsbG8sIFdvcmxkIQ==.

This converter encodes and decodes Base64 in your browser for general development use. Base64 is not encryption and offers no protection for secrets. Check results against your own system's expected format, such as padding or the URL-safe alphabet, before relying on them.

Direction

Base64

SGVsbG8sIFdvcmxkIQ==

13 bytes of UTF-8, 20 characters out

We email you a link back to this page and add you to occasional ManyTools emails; every email has a one-click unsubscribe.

Embed this calculator on your site →

About the Base64 Converter

Base64 exists so that binary data can travel through systems built for plain text, such as email bodies, JSON fields, data URLs and HTTP headers. It takes 3 bytes at a time, splits those 24 bits into four groups of 6, and writes each group as one of 64 characters, padding the end with = so the length is a multiple of 4. That is why encoded text runs about a third longer. Text becomes bytes as UTF-8 first, so accented letters take two bytes and most emoji four; the byte count under the result shows how many went in. The URL-safe variant swaps + and / for - and _, because + and / have special meanings in web addresses and file names, and it often drops the padding, which is how signed tokens such as JWTs are written. When decoding, it accepts either alphabet, skips spaces and line breaks and tolerates missing padding, but it names the first wrong character rather than guessing, and it says so when the bytes are not UTF-8 text.

Frequently asked questions

Is Base64 encryption?+

No. Base64 is an encoding that anyone can reverse without a key; paste the result into the decoder and the original comes straight back. Do not use it to hide passwords or personal data.

Why does my Base64 end in = or ==?+

The = signs are padding. Base64 works in groups of 3 bytes, so a 13-byte message leaves 1 byte over in its last group, which becomes 2 characters plus ==. Two leftover bytes become 3 characters plus a single =.

What is the difference between Base64 and base64url?+

They use the same scheme with two different characters. Base64url writes - and _ where standard Base64 writes + and /, so the result can sit in a web address or file name without escaping. Tick the URL-safe box to get it, and untick padding if your system expects none.

Why does decoding say my input is not valid UTF-8?+

The Base64 was fine, but the bytes inside it are not text. Images, PDFs and compressed files are common examples. The converter reports that rather than printing replacement characters, so you know the data needs a different tool to open.

Embed this calculator

Free to use on your own site. Paste this snippet where you want the base64 converter to appear — it resizes itself automatically.

Embed code
<iframe
  src="https://manytools.co/embed/base64-converter"
  title="Base64 Converter by ManyTools"
  data-manytools="base64-converter"
  width="100%"
  height="640"
  loading="lazy"
  style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
  window.addEventListener("message", function (e) {
    if (e.origin !== "https://manytools.co") return;
    var d = e.data || {};
    if (d.type !== "manytools:embed:height" || d.slug !== "base64-converter") return;
    var f = document.querySelector('iframe[data-manytools="base64-converter"]');
    if (f && d.height) f.style.height = d.height + "px";
  });
})();
</script>
Plain link (fallback)
<a href="https://manytools.co/dev/base64-converter">Base64 Converter by ManyTools</a>