About this base64 encoder
Base64 represents bytes with printable characters; it is an encoding, not encryption. This page first converts text to UTF-8 bytes, which makes non-ASCII scripts and emoji work correctly.
Standard Base64 uses + and / and normally includes = padding. Base64URL replaces those two characters with - and _; this tool emits its common unpadded form used by JOSE and JWT.
Base64 encoding is everywhere: data URIs in HTML, JWT tokens, API payloads, and file uploads all rely on it to safely transmit binary or special data through text-only channels. Yet many online Base64 tools produce wrong results for non-ASCII text, emoji, or special characters. This free Base64 encoder and decoder handles Unicode correctly by converting to UTF-8 bytes first, supporting emoji, international scripts, and any character set—essential for modern web development.
Choose between Standard Base64 (with + and / characters, uses padding) and Base64URL (with - and _ characters, unpadded). Standard Base64 is universal; Base64URL is safer for URLs and filenames and is standard in JOSE/JWT. This tool gets the details right: handles padding correctly, preserves exact byte sequences, and refuses ambiguous or corrupted input rather than silently producing wrong results. Encoding reads text as UTF-8; decoding requires valid characters and proper UTF-8 byte sequences.
Use cases span web development, API integration, and data transport. Embed images as data URIs in HTML to reduce HTTP requests, encode credentials for Basic Auth headers, convert binary data for APIs, and work with JWT tokens. The strict validation catches encoding errors early—far better than discovering mid-integration that your Base64 round-trip lost data. All processing happens locally; no uploads, no external APIs, no stored history.
How to use this tool
-
01
Choose the correct alphabet
Select standard Base64 for general data or Base64URL when a URL- and filename-safe alphabet is required.
-
02
Encode or decode once
Encoding reads the input as UTF-8 text. Decoding requires valid alphabet, padding and UTF-8 bytes.
-
03
Copy the exact output
Base64 output has no inserted line breaks. Base64URL output omits trailing padding.
Worked examples
Standard Base64
helloaGVsbG8=Unicode is encoded as UTF-8
✓4pyTLimits and edge cases
- Base64 is reversible and provides no secrecy, authenticity or integrity protection.
- Standard Base64 and Base64URL use different characters. Select the matching alphabet rather than mixing them.
- The decoder is strict about alphabet, placement of padding and impossible lengths. It does not silently double-decode a result.
- Text decoding expects valid UTF-8. Arbitrary binary bytes may not represent text; use a binary-aware application for those files.
Standards and references
Common questions
What is the difference between Base64 and Base64URL?
Base64URL replaces + with - and / with _ so values fit more safely in URLs and filenames. JOSE commonly omits = padding as well.
Can Base64 hide passwords or secrets?
No. Anyone can decode it. Use an appropriate encryption or password-hashing design instead of Base64 for security.