Base64 Encode / Decode — Free, No Sign-up

Free tool to encode text to Base64 or decode it back, switching modes in one click. Useful for email attachments and JWT tokens. Runs in your browser — nothing sent to a server.

[[ translations.error_invalid ]]
Advertisement

Tips

  • The name Base64 comes from using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). The = at the end is a padding character to make the byte count a multiple of 3.
  • JWT (JSON Web Token) encodes its header, payload, and signature using Base64URL — a variant that replaces + with - and / with _ to be URL-safe. The output of this tool differs slightly from JWT tokens.
  • Data URIs in HTML/CSS (data:image/png;base64,iVBOR...) use Base64 to embed assets directly in source code without a separate file request.
  • Base64 is encoding, not encryption. Anyone can decode it instantly without a key. Never use it to protect sensitive information.
Advertisement

FAQ

No. Base64 is encoding, not encryption. Anyone can decode it instantly without a key. Use dedicated algorithms like AES or BCrypt to protect sensitive data.

Yes. This tool uses UTF-8 encoding internally, so any Unicode character — Japanese, Chinese, emoji — is handled correctly.

Base64 converts every 3 bytes into 4 characters, so the output is approximately 33% larger than the original.

Email attachments (MIME), data URIs in HTML/CSS (data:image/png;base64,...), JWT authentication tokens, and binary data transfer over text-based APIs.
Tool-kun

Side Note — Base64, Email, and the URL Collision

The biggest driver behind Base64's adoption was email. SMTP in the 1970s–80s could only handle 7-bit ASCII text, so binary attachments would get corrupted in transit. MIME solved this by Base64-encoding binary data into plain text — a convention still used today inside every email attachment.

Base64's character set includes + and /, which have special meanings in URLs. To fix this, Base64URL was invented (+→-, /→_, no padding). JWT and OAuth tokens use Base64URL, which is why they look slightly different from standard Base64.

Converting 3 bytes of binary into 4 Base64 characters means the output is about 33% larger than the input. Embedding large images as data URIs bloats HTML files significantly — it's fine for small icons, but not recommended for larger assets.

Advertisement