Base64 is the internet’s way of carrying binary data — and text with tricky characters — through systems that only handle plain ASCII safely: email, URLs, JSON, data URIs, basic-auth headers. This Base64 encode decode tool converts in both directions instantly, right in your browser. Paste any text — accents, emoji and non-Latin scripts included, because the encoder works on the text’s UTF-8 bytes, exactly as modern standards expect — and get clean Base64 out. Or paste Base64 and read the original text back. There is also a URL-safe mode that swaps the two problem characters (+ and /) for URL-friendly ones and drops the padding, the variant used in JWTs and web tokens. Nothing you paste is uploaded or stored; encoding and decoding happen on your device, which is exactly where tokens and test strings should stay.
What Base64 actually does
Base64 takes data three bytes at a time and rewrites it as four characters chosen from a 64-character alphabet: A–Z, a–z, 0–9, plus + and /, with = padding at the end when the input does not divide neatly by three. The result is about 33% larger than the original, and in exchange it can travel through anything that handles plain text — which is why your email client encodes attachments in Base64 (MIME), why images get inlined into CSS as data URIs, and why API keys and tokens so often look like Base64. It is an encoding, not encryption: anyone can decode it instantly, a point worth remembering before pasting anything secret-looking into it. This tool follows RFC 4648, including the strict UTF-8 handling that makes text like “héllo ✓” round-trip perfectly.
Standard vs URL-safe Base64
The standard alphabet’s two special characters are troublemakers inside URLs: + can be read as a space and / as a path separator, and the = padding often needs escaping too. The URL-safe variant (RFC 4648 §5) replaces them with - and _ and usually drops the padding entirely. That is the flavour you will meet in JSON Web Tokens, Firebase keys and many share links. Use the checkbox above when a token will travel inside a URL or filename; decoders here accept the padding-free form automatically. If a decode fails, the usual culprits are a copied string that was cut short, a standard string pasted with URL-safe mode on, or text that was never Base64 to begin with.
Everyday jobs for this tool
Developers decode Base64 constantly: reading the payload of a JWT to check its claims, inspecting a basic-auth header while debugging an API, unpacking a config value an app stored encoded, or turning a short string into a data URI. Testers use it to prepare fixtures; support teams use it to see what an encoded error message actually says. One caution that separates careful users from careless ones: because Base64 is reversible by anyone, finding a password “hidden” in Base64 means it was never protected at all — treat it as plaintext in any security review. And for files rather than text — images, PDFs, archives — a dedicated file encoder is the right tool; this one is built for text you can paste.
Frequently asked questions
Is Base64 encryption? Can I hide secrets with it?
No. Base64 is a public encoding with no key; anyone can reverse it in a second, including with this page. Never treat Base64 as protection for passwords or private data.
Why does my text get longer when encoded?
Base64 stores three bytes in four characters, so output grows by roughly a third, plus up to two padding characters. That size cost is the price of using only safe, printable characters.
Does this tool work with accents and emoji?
Yes. The encoder first converts your text to its UTF-8 bytes — the modern standard — so text in any language, plus emoji, encodes and decodes back exactly.
What does the URL-safe option change?
It uses the RFC 4648 URL-safe alphabet: - instead of +, _ instead of /, and no = padding — the format used by JWTs and web tokens.
Related tools
Versión en español: Codificar y Decodificar Base64 — Codificador Base64 Online Gratis. You may also like: MD5 Hash Generator — Generate MD5 Checksums Online Instantly · Hex to RGB Converter — Convert Hex Color Codes to RGB & HSL.
Embed this tool on your website — free
Copy the code below to add this working tool to your own page. A small credit link stays with it — that’s all we ask.
