Select Mode
Choose Encode to convert text to Base64, or Decode to convert Base64 back to text.
Encode text to Base64 or decode Base64 back to text. Handles Unicode correctly. Works entirely in your browser with no uploads.
Paste or type text. Choose Encode or Decode above.
Choose Encode to convert text to Base64, or Decode to convert Base64 back to text.
Enter plain text (for encoding) or a Base64 string (for decoding). The tool handles Unicode, emojis, and whitespace automatically.
Click Copy to copy the result to clipboard, or Download to save as a .txt file.
btoa() fails on UnicodeThe native btoa() and atob() functions only accept Latin-1 (ISO-8859-1) strings. When you pass multi-byte characters like emojis (🎉), Chinese/Japanese/Korean text, or any character outside the 0-255 range, they throw a DOMException: The string contains characters outside of the Latin1 range.
This tool solves that by first serializing the input to UTF-8 bytes using TextEncoder, then encoding those bytes to Base64. For decoding, it decodes Base64 to bytes, then uses TextDecoder to reconstruct the original Unicode string. This round-trips correctly for all valid Unicode code points.
// What browsers do (fails on emoji)
btoa("🎉"); // DOMException
// What this tool does (works)
const bytes = new TextEncoder().encode("🎉");
const base64 = btoa(String.fromCharCode(...bytes));
// Result: "8J+Riw=="
Standard Base64 (RFC 4648 §4) uses A-Z, a-z, 0-9, +, and /, with = padding. These characters have special meaning in URLs and JSON:
+ and / are reserved in URL paths and query strings= padding can be confused with query separatorsBase64URL (RFC 4648 §5) is a URL-safe variant:
+ → - (minus)/ → _ (underscore)= padding entirelyThis makes Base64URL safe for JWTs, URL parameters, filename tokens, and cookie values without additional escaping.
// Standard Base64
"SGVsbG8gV29ybGQh" // Contains no special chars (lucky case)
"PGh0bWw+" // Contains + — unsafe in URLs
// Base64URL
"SGVsbG8gV29ybGQh" // Same (no special chars)
"PGh0bWw-" // + replaced with - — URL-safe
Base64 encoding represents binary data as plain ASCII text using a fixed 64-character alphabet, which lets images, files, and credentials move through systems that handle only text. The DevPouch Base64 Encoder/Decoder is a free, online developer utility for encoding plain text into Base64 or decoding Base64 strings back into their original content. Because every operation runs entirely in your browser, no data is uploaded to a server, nothing is stored externally, and sensitive material stays on your machine. It is a reliable client-side alternative to server-based converters that risk leaking private payloads.
Common use cases include embedding small images in HTML or CSS as data URIs to reduce HTTP requests, encoding username and password pairs for Basic Authorization headers in API requests, and passing binary payloads through JSON, email headers, or URL query strings without corruption. Developers also use it to decode opaque tokens, JWT segments, and legacy data exports while debugging, to store configuration blobs in text-based formats, and to preserve byte integrity across incompatible systems. It is especially useful for moving image assets, authentication material, and binary configuration through text-only transports.
Because all encoding happens client side, confidential payloads such as API keys and user data never leave your computer, which makes this utility safe for ad hoc work. It requires no installation, no registration, and no external dependencies, so it fits naturally into frontend development, continuous integration scripts, and quick debugging sessions. Use it whenever binary content must travel through a text-only channel without loss or corruption, and pair it with DevPouch tools like URL encoder and JSON formatter for complete payload handling.