Skip to main content
SyntixDev

Base64 Encoder & Decoder

Encoding & Crypto

Base64, MD5/SHA/HMAC hashes, JWT decoder, URL query parser, and HTML entities — 100% client-side.

100% client-side — files and inputs never leave your browser.

Output44 chars
About this tool and how it works

What Base64 is (and what it is not)

Base64 turns arbitrary bytes into 64 printable ASCII characters so binary data can travel through systems that only expect text: JSON bodies, email (MIME), HTTP headers, and data: URIs. Every 3 input bytes become 4 output characters, so encoded data is about 33% larger than the original. Base64 is an encoding, not encryption: anyone can decode it, so never use it to hide passwords or tokens.

How to use this tool

  • Text → Base64: type or paste text. It is converted to UTF-8 bytes first, so accents, emoji, and CJK characters survive the round trip.
  • Base64 → Text: paste an encoded string to decode it. Missing = padding and URL-safe characters are accepted.
  • URL-safe mode: swaps + and / for - and _ and drops padding — the variant used in JWTs and query strings.
  • Images: drop a file to get a ready-to-paste data:image/...;base64, URI.

Worked example

Olá is the UTF-8 bytes 4F 6C C3 A1, which encode to T2zDoQ==. A naive btoa("Olá") in JavaScript either throws or produces Latin-1 output because it works on UTF-16 code units, not UTF-8 bytes — the most common Base64 bug in front-end code.

When to inline images as Data URIs

Inlining saves an HTTP request, which helps for tiny icons (under ~2 KB). For anything larger, the 33% size overhead and the loss of separate caching usually make a normal image file the better choice.

Frequently asked questions

Why does my decoded text show strange characters like "á"?

The string was encoded from UTF-8 bytes but decoded as Latin-1 (or the other way around). This tool always decodes to UTF-8, which fixes the typical "á" instead of "á" mojibake.

What is the difference between standard and URL-safe Base64?

Standard Base64 uses + and / and pads with =. URL-safe Base64 (RFC 4648 §5) uses - and _ and usually omits padding, so it can be placed in URLs, file names, and JWT segments without escaping.

Is there a size limit?

Only your browser memory. Encoding runs locally, so multi-megabyte files work, but very large Data URIs make pages slow to parse.

Other tools