Base64 Encoder & Decoder
UTF-8 ↔ Base64 with optional URL-safe variant
🔒 This tool runs entirely in your browser — your data never leaves your device.
Base64 Encoder / Decoder
Convert text to Base64 and back, fully in your browser. Supports both standard Base64 (RFC 4648 §4) and URL-safe Base64 (RFC 4648 §5, using - and _ without padding). UTF-8 safe — handles Chinese, emoji and other non-ASCII characters correctly, unlike a naive btoa() call.
- UTF-8 safe — Chinese / emoji are encoded correctly
- Standard and URL-safe (base64url) variants
- Tolerates whitespace and missing padding when decoding
- Auto-detects URL-safe characters when decoding
- Runs locally in your browser — zero data upload
FAQ
Why not use btoa() / atob() directly?
btoa() operates on Latin-1, so it throws on non-ASCII characters such as 世 or 🚀. This tool encodes the UTF-8 byte representation, which is the universal modern convention.
What is URL-safe Base64?
RFC 4648 §5 replaces + and / with - and _, and usually omits the trailing = padding. It can be used directly in URLs and filenames. Decoding here accepts both variants automatically.
Will my input be uploaded?
No. Encoding and decoding happen locally in your browser; the server never receives your data.