🧑‍💻

Base64 Encode/Decode

🔒 In your browser

Encode & decode Base64 with URL-safe, MIME and live modes.

Output
SGVsbG8sIFRvb2xzSHViISDwn5qA

About the Base64 Encode/Decode

Base64 encodes binary or text data using 64 safe ASCII characters, so it can travel through systems that only handle text — email, JSON, data URIs and HTTP headers. This free Base64 encoder and decoder converts text to Base64 and back, with URL-safe, MIME line-splitting and live modes.

It all runs in your browser, so your data is never uploaded.

How to encode and decode Base64

  • Type or paste text to encode it to Base64, or paste Base64 to decode it back.
  • Switch to URL-safe mode when the result goes in a URL or filename.
  • Enable MIME mode to split long output into standard 76-character lines.

URL-safe and MIME variants

Standard Base64 uses + and / and pads with =, which is fine for most uses but breaks in URLs and filenames. URL-safe Base64 swaps + and / for - and _ so the value survives in a link. MIME mode splits long output into fixed-length lines for email. This tool supports all of them, plus a live mode that encodes or decodes as you type.

Frequently asked questions

What is Base64 used for?

Base64 turns binary or text data into a plain-ASCII string so it can be safely embedded in text-only contexts like JSON, XML, email attachments, data URIs and HTTP headers.

What is URL-safe Base64?

A variant that replaces the + and / characters with - and _ so the encoded value can be used in URLs and filenames without further escaping.

Is Base64 encryption?

No. Base64 is encoding, not encryption — anyone can decode it. It hides nothing; it only makes data safe to transport as text.

Is my data uploaded?

No. Encoding and decoding happen entirely in your browser.

Is Base64 a form of encryption?

No. Base64 is encoding, not encryption — anyone can decode it. It hides nothing; it only makes binary or text data safe to transport through text-only channels like JSON, email and URLs.

Related searches

base64 encodebase64 decodebase64 converterbase64urlencode base64 onlinedecode base64mime base64

Learn more

Related Developer tools

🔗 Embed this tool on your website — free

Copy this and paste it into your page's HTML. The tool runs in the visitor's browser, just like here. Change height to fit, or add the optional auto-resize snippet below. Add ?theme=dark to the URL for dark mode.

<iframe src="https://toolhq.dev/embed/base64/" title="Base64 Encode/Decode — ToolsHub" width="100%" height="520" style="border:1px solid #e5e7eb;border-radius:12px;max-width:680px" loading="lazy"></iframe>
Optional: auto-resize the iframe height

Add this once on the same page so the iframe grows to fit the tool:

<script>
addEventListener("message", function (e) {
  if (e.data && e.data.type === "toolshub:resize") {
    document.querySelectorAll('iframe[src*="/embed/"]').forEach(function (f) {
      if (f.contentWindow === e.source) f.style.height = e.data.height + "px";
    });
  }
});
</script>