This base64 encoder and decoder turns any text or file into Base64 and back again, instantly, without uploading a single byte. Paste a string and watch the encoded output appear as you type, drop a file to get its Base64 representation or a ready-made data: URI, or paste Base64 back in and download the original file. Everything the base64 encoder and decoder does runs in your browser tab, so credentials, certificates, and private images never leave your machine.
What This Base64 Encoder and Decoder Does
- 📝 Text mode both ways — encode plain text to Base64 or decode Base64 back to text, with the result updating live as you type. Full UTF-8 support, so Cyrillic, CJK, and emoji survive the round trip intact.
- 📁 File mode both ways — drag any file in to get its Base64, or paste Base64 in and download the decoded file. Binary-safe: ISOs, PNGs, PDFs, and certificates all come back byte-for-byte identical.
- 🔗 URL-safe alphabet — flip one toggle to swap
+and/for-and_, the RFC 4648 §5 variant that JWTs and query strings require. - 🖼 Data URI output — get a complete
data:image/png;base64,…string you can paste straight into CSS, an<img>tag, or an email template. - 📐 MIME line wrapping and padding control — wrap output at 76 characters for RFC 2045 contexts, or strip the trailing
=padding when a system expects it gone. - 🔍 Automatic type detection on decode — the base64 encoder and decoder sniffs magic bytes, tells you what it found (PNG, PDF, ZIP, gzip, and more), suggests a filename, and previews decoded images inline.
- 🧹 Forgiving input — line breaks, stray whitespace, missing padding, the URL-safe alphabet, and full
data:URI prefixes are all accepted without complaint. Genuinely broken input gets a specific error pointing at the offending character.
How to Use It
The base64 encoder and decoder has two switches at the top: direction (Encode or Decode) and source (Text or File). Pick one of each and the interface reshapes itself around what you’re doing:
- Choose Encode or Decode with the buttons at the top.
- Choose the Text or File tab depending on what you’re feeding in.
- Type, paste, or drop your input. Text results appear instantly; files show a progress bar while they’re read.
- When encoding, set any options you need — URL-safe, no padding, wrap at 76, or data URI.
- Copy the result with the 📋 button, save it as a
.txtfile, or — when decoding a file — download the reconstructed original. - Use ⇅ Swap in text mode to push the output back into the input and flip direction, which makes verifying a round trip a single click.
Base64 Is Encoding, Not Encryption
This is worth being blunt about, because it causes real incidents: Base64 provides zero confidentiality. Anyone who sees the string can decode it in one paste — including in this base64 encoder and decoder. A Kubernetes Secret, a ~/.docker/config.json registry credential, or an HTTP Authorization: Basic header is plaintext wearing a thin disguise. Encode data to make it survive a text-only channel; encrypt it if it needs to stay private.
The other thing to expect is size. Base64 packs 3 bytes into 4 characters, so encoded output is roughly 33% larger than the source, plus a couple of bytes for padding and any line breaks you add. That’s the price of squeezing binary data through channels that only tolerate text — and it’s why inlining a large image as a data URI is usually a worse idea than just linking to the file. The base64 encoder and decoder prints the character count on both sides, so you can see that overhead for yourself before committing to it.
Practical Use Cases
Here is where a base64 encoder and decoder tends to earn its keep in a homelab or development workflow:
- 🔐 Reading Kubernetes and Docker secrets — every value in a Kubernetes Secret manifest is Base64. Paste one in to see what a deployment is actually mounting, or check a registry credential from the Docker config file described in the Docker security guide for self-hosting.
- 🔑 Inspecting JWTs and API tokens — a JWT is three URL-safe Base64 segments joined by dots. Flip the URL-safe toggle on and decode the header or payload in the base64 encoder and decoder to see the claims and expiry an API is really sending you.
- 📜 Certificates and keys — the body of a PEM file is Base64-encoded DER. Decode it to a binary file when a tool insists on DER, or encode a key blob to paste it safely into a config template alongside your self-hosted Vaultwarden entries.
- 🖼 Inlining small assets — turn a favicon or a small logo into a data URI so a single-file dashboard or email template carries its own images. Pairs well with the Favicon Generator for producing the source icon first.
- 🧾 Rescuing embedded attachments — pull the Base64 blob out of a raw email, a JSON API response, or a webhook payload, and turn it back into the actual PDF or image. Use the JSON Formatter and Validator first if you need to find the field.
- ✅ Verifying what you decoded — after reconstructing a file, run it through the Hash Generator for Files and Text and compare the checksum against the source to prove nothing was lost in transit.
Privacy, Ads, and Data Policy
Base64 work usually involves exactly the kind of data you should never paste into a random website: secrets, tokens, certificates, private documents. This base64 encoder and decoder implements RFC 4648 directly in the page’s own JavaScript — no libraries, no CDN requests, no network calls of any kind after the page loads.
- ✅ 100% free — no registration, no account, no paywall.
- ✅ No data storage — text and files stay in your browser tab and are never sent to a server.
- ✅ No ads in results — no watermarks, no tracking pixels, no upsells.
- ✅ Client-side only — no external API calls and no CDN dependency for this tool.
Open Source and Self-Hosting
This base64 encoder and decoder is part of the open-source vahac-tools repository on GitHub — three files, no build step, no dependencies. Drop the folder onto any static host or Nginx container and it works offline, which is the right answer when the data you’re decoding shouldn’t touch the internet at all. If you’d rather run a whole suite locally, the same logic applies to self-hosting IT Tools in Docker.
The base64 encoder and decoder sits alongside the rest of the collection on the Tools page.
Built by VahaC — 100% client-side, no data sent anywhere.
