Converter · SOTA UTF-8 safe + Base64URL
Base64 Encoder & Decoder
Encode and decode Base64 text with full UTF-8 and emoji support. Standard Base64 (RFC 4648 §4) and URL-safe Base64URL (§5), with toggleable padding.
How to Use Base64 Encoder / Decoder in 3 Steps
- Configure. Paste text, drop a file, or paste Base64 to decode. The tool auto-detects whether you want to encode or decode.
- Process. Select flavor: standard Base64 (RFC 4648 §4, uses +/= characters), Base64URL (RFC 4648 §5, uses -_ and optional padding) for JWT and URL-safe use.
- Export. Copy the result. For decoded binary, download as a file; for decoded text, view in a syntax-highlighted text area.
Why Base64 Encoder / Decoder on Pixlane
Base64 encoding is used for embedding binary data in text contexts: data URIs, JWT payloads, email attachments (MIME), API tokens, HTTP Basic Auth, and anywhere bytes must travel through text channels. Pixlane uses TextEncoder/TextDecoder for correct UTF-8 handling — so emoji, CJK characters, and accented text round-trip correctly, unlike btoa/atob on raw strings.
- UTF-8 Correctness — Uses TextEncoder to encode UTF-8 bytes before Base64 — emoji (🎉), Cyrillic (Привет), CJK (日本語), and accents (café) all round-trip correctly. Pure btoa() mangles these.
- Base64URL Support — RFC 4648 §5 URL-safe variant uses -_ instead of +/ and typically omits padding. Required for JWT, URL parameters, and some binary protocols.
- File Support — Drop any file to encode its binary content. Decode text to download the resulting file with auto-detected MIME type.
- Padding Toggle — Control trailing = padding. Some systems (JWT, DNSSEC) require no padding; most APIs require it. Switch with one click.
Frequently Asked Questions
Why do emoji get mangled with btoa()?
btoa() requires its input to be a binary string (each char 0-255). JavaScript strings are UTF-16 — an emoji is 2 chars each above 0xFFFF, so btoa() throws. Pixlane uses TextEncoder to convert to UTF-8 bytes first, then Base64 — the correct pipeline.
What's the difference between Base64 and Base64URL?
Standard Base64 uses +/ in its alphabet and = for padding. Base64URL replaces + with -, / with _, and typically omits =. Both encode 3 bytes into 4 characters; only the alphabet differs.
Can I encode binary files?
Yes. Drop any file — the tool reads its bytes via FileReader and encodes them. Useful for data URIs, inline images in CSS/HTML, or JWT payloads.
Is my data private?
Yes. All encoding/decoding happens in your browser using native APIs (TextEncoder, btoa, atob). Nothing is uploaded or logged.