Base64 Encoder / Decoder

Convert text to Base64 and back — UTF-8 safe, URL-safe variant included, everything in your browser.

What is Base64?

Base64 is an encoding scheme that represents binary data using 64 printable characters (A–Z, a–z, 0–9, + and /). It exists so binary content can travel safely through systems designed for plain text — HTTP headers, JSON payloads, XML, email bodies. You'll meet it constantly as a developer: Basic auth headers (Authorization: Basic base64(user:pass)), data URIs for inlining small images in CSS or HTML, JWT segments, and API payloads that embed files.

How this tool works

Encoding and decoding happen entirely in your browser using the standard btoa/atob primitives, wrapped with TextEncoder/TextDecoder so multi-byte UTF-8 text — emoji, Devanagari, Bengali, Chinese, anything — round-trips correctly (naive btoa throws on non-Latin characters). The decoder also accepts URL-safe Base64 (-/_ instead of +//) and repairs missing padding automatically.

FAQ

Is Base64 encryption?

No — this is the most common misconception. Base64 is an encoding, not encryption: anyone can decode it instantly (you just did). Never use Base64 to protect secrets; use real encryption, and keep secrets out of client-side code entirely.

Why is Base64 output ~33% larger than the input?

Base64 maps every 3 bytes of input to 4 output characters, so encoded data is 4/3 the size of the original (plus up to two = padding characters). That's the price of using only printable characters.

What is URL-safe Base64?

Standard Base64 uses + and /, which clash with URL syntax. The URL-safe variant (RFC 4648 §5) substitutes - and _ and usually drops the = padding — it's what JWTs and many APIs use. Toggle "URL-safe output" above to produce it.

Built by Abasthan Cloud

Free tools are just the start

Deploy your next app on bare-metal cloud with per-second billing — your first app is free, no credit card required.