Free Online Utility • Unicode Studio • Grapheme-Aware Engine

Convert Unicode to Base64

Encode full Unicode strings (emojis, CJK, accented scripts) into UTF-8 safe Standard Base64 or URL-safe Base64url with optional MIME wrapping.

Reference & Unicode Spec Unicode 16.0
TextEncoder().encode(unicode) -> UTF-8 bytes -> Base64 (never crashes like raw btoa!)
StandardA-Z, a-z, 0-9, +, /, =
Base64urlJWT / URL safe (- _ )
Expansion+33% over UTF-8 bytes
UTF-8 SAFE BASE64
Encoded Base64 Output

        
100% client-side Unicode Engine Instant

Session Calculation Log

No entries recorded in this session yet.

How Convert Unicode to Base64 Works

Convert Unicode to Base64 encodes international Unicode text safely through UTF-8 before Base64 serialization, avoiding the classic JavaScript `btoa()` Latin-1 crash on emojis and non-Latin characters.

The Unicode Standard assigns unique scalar code points from U+0000 through U+10FFFF across 17 planes, encompassing over 150,000 characters spanning world scripts, mathematical operators, technical symbols, combining diacritics, and multi-codepoint emoji sequences. Every operation in this utility runs completely client-side inside your browser using native code-point and grapheme-cluster algorithms so surrogate pairs, ZWJ emoji, and combining marks stay intact with zero server latency.

UTF-8 Byte Bridge + RFC 4648 Base64

bytes = new TextEncoder().encode(str)
base64 = btoa(bytes_as_binary_string)
Base64url: replace "+"->"-", "/"->"_", strip "="

Every 3 UTF-8 bytes (24 bits) encode into 4 Base64 characters (6 bits each), making full Unicode text safe for HTTP headers, JWT payloads, and JSON transport.

Worked Reference Examples

InputOutputTechnical Note
Hello, Unicode 🌍!SGVsbG8sIFVuaWNvZGUg8J+MjSE=19 UTF-8B -> 28 chars
こんにちは世界44GT44KT44Gr44Gh44Gv5LiW55WM21 UTF-8B -> 28 chars
Base64url modeReplaces + / =Safe for URLs & JWTs

Practical Developer & Internationalization Workflows

JWT & OAuth Payloads

Generate URL-safe Base64url Unicode JSON claims without padding.

MIME Email & PEM Transport

Wrap Base64 output at 64 or 76 characters per line.

Compatibility, Edge Cases & Best Practices

Base64 is an encoding for transport safety, not encryption — anyone can decode Base64 instantly.

Copy verified outputs directly to your clipboard or export them as UTF-8 text files ready for web apps, REST APIs, database migrations, typography tests, and localization pipelines.

Frequently Asked Questions

Why does native JavaScript btoa() fail on Unicode emojis?
Because `btoa()` only accepts code points 0–255; encoding via UTF-8 `TextEncoder` first handles all 1,114,112 Unicode code points cleanly.
When should I use URL-Safe Base64url?
Use Base64url whenever embedding Base64 inside URLs, query parameters, filenames, or JWT tokens.
Does MIME line wrapping alter the decoded text?
No — Base64 decoders ignore whitespace and line breaks.