Base64 Encoder & Decoder: What It Does
Converts plain text and binary files to RFC 4648 Base64 strings, or decodes Base64 back to plain text. It handles multi-byte UTF-8 characters and emoji without truncation, and provides a URL-safe alphabet mode.
Example
HelloSGVsbG8=Packs UTF-8 byte sequences into 6-bit ASCII characters.
How to Use
- Type or paste text into the input field, or drag and drop a file.
- Select Encode or Decode mode.
- Toggle URL-safe mode when embedding tokens into query strings or HTTP headers.
Limitations
- Base64 encoding increases overall payload size by approximately 33%.
- Corrupt Base64 input reports a decode error with character offset.
Frequently Asked Questions
Why does standard window.btoa fail on emoji and accented text?
The legacy btoa API expects Latin-1 binary strings. This encoder passes text through TextEncoder first, ensuring complete multi-byte UTF-8 compliance.
What is the difference between standard and URL-safe Base64?
URL-safe mode replaces plus (+) with hyphen (-) and slash (/) with underscore (_) so strings pass safely through URLs without percent-encoding.
Command-Line Equivalent
echo -n Hello | base64Encode stdin to Base64 on the command line.
Embed or Cite Base64 Encoder & Decoder
Embed this interactive utility directly into documentation or blog posts, or link via GitHub badge:
Free for Blogs & Docs<iframe src="https://filexshare.com/developer/base64-encoder" width="100%" height="650" frameborder="0" title="Base64 Encoder & Decoder - FileXShare"></iframe>
<p><a href="https://filexshare.com/developer/base64-encoder" rel="nofollow">Powered by FileXShare</a></p>[](https://filexshare.com/developer/base64-encoder)Related Tools
Encode text into percent-encoded URL strings or decode query parameters safely.
Convert special HTML characters like <, >, &, and quotes into safe HTML entities.
Generate MD5, SHA-1, SHA-256, SHA-384, SHA-512, and HMAC hashes for text or files, with checksum comparison. MD5/SHA-1 are legacy compatibility options — never use fast hashes for passwords.
Convert images to Base64 data URIs for embedding in HTML/CSS, or decode Base64 back into image files.