Base64 Encode & Decode

RUNS ON THIS DEVICE

Convert text or a file to base64, or paste base64 and get the original back — instantly, and without your input going anywhere.

What base64 actually is

Base64 writes arbitrary bytes using 64 safe characters — letters, digits, plus and slash — so binary data can travel through systems built for plain text: JSON configs, HTML attributes, email bodies. It is not compression and it is not encryption; the output is about a third larger than the input, and anyone can reverse it. That reversibility is the point: base64 is a transport format, and this page lets you move in either direction.

How the tool works

Type or paste text, or pick a file, and the result appears immediately — the encoding runs as plain JavaScript in the page, synchronously, with no server round-trip and no waiting at typical sizes. One click swaps direction between encoding and decoding, and for files you can output a ready-made data URI, complete with the correct MIME prefix, for embedding straight into CSS or HTML.

Why decoding locally matters

The strings people paste into base64 tools are often the last things that should touch someone else's server: JWT header and payload segments, credentials from a config file, attachment bodies from a raw email. Because this tool makes no network requests with your input, inspecting a token or debugging a MIME attachment doesn't expose it to anyone.

Common jobs it handles well: embedding small icons in a stylesheet to save an HTTP request, checking what a JWT actually contains, and encoding values destined for environment variables or Kubernetes secrets.

Frequently asked questions

Is anything I paste or select sent over the network?

No. Encoding and decoding happen as JavaScript running in the page itself — there is no backend, and your text or file is never transmitted.

Can it produce a data URI for an image?

Yes. Encode a file and choose the data URI output to get a string with the MIME prefix included, ready to drop into a CSS background or an img src.

Why is the base64 output bigger than my original file?

Base64 represents every 3 bytes of input as 4 characters of output, so encoded data is roughly 33 percent larger. That overhead is inherent to the format, not a flaw in the tool.

Is base64 a way to keep data secret?

No. It is an encoding, not encryption — anyone who sees a base64 string can decode it instantly, so never rely on it to protect passwords or keys.