Base64 Encoder & Decoder (with Full UTF-8 & Emoji Support)
Decode Base64 strings to UTF-8 plain text or encode plain text to Base64 with full multi-byte and emoji compatibility.
Privacy First: 100% Client-Side Processing
Processed in your browser. Files are never uploaded.
How to Use the Base64 Decoder & Encoder (UTF-8 Compatible)
- 1Select 'Decode' to convert Base64 back into plain text, or 'Encode' to turn text into Base64.
- 2Paste your text or Base64 string into the input area.
- 3The converted result renders instantly in real-time.
- 4Click 'Copy' to copy the output to your clipboard.
Formula & How It Works
Radix-64 Multi-Byte Encoding
Encodes UTF-8 byte sequences into 6-bit chunks mapped across the 64-character ASCII table (A–Z, a–z, 0–9, +, /) with '=' padding for modulo 3 alignment.
Worked Examples
Standard ASCII Greeting
Input: SGVsbG8gV29ybGQh
Explanation: 12 bytes of ASCII text decoded cleanly from 16 Base64 characters.
UTF-8 Multi-Byte and Emojis
Input: 8J+agCBHbyBGYXN0IPCfn6U=
Explanation: Properly interprets 4-byte UTF-8 emoji codepoints without throwing URI malformed exceptions.
Encoding JSON Authentication Token
Input: {"sub":"user_123","admin":true}
Explanation: Encodes structured payload into typical JWT-style Base64 payload.
Frequently Asked Questions
Is Base64 a form of encryption?▼
No. Base64 is an encoding format, not encryption. It provides no confidentiality because anyone can instantly decode it back to the original text without a secret key.
Why do some Base64 strings end with '='?▼
The '=' symbol is padding. Base64 processes data in 3-byte blocks. If the input data is not evenly divisible by 3 bytes, one or two '=' characters are appended to complete the 4-character alignment.
Can I decode Base64 images with this tool?▼
Yes, you can decode base64 strings representing SVG or text assets, or inspect the underlying byte stream.
Why does standard atob fail on emojis?▼
JavaScript's native `atob` and `btoa` functions were designed for 8-bit Latin1 strings. Modern emojis use multi-byte UTF-8 sequences. Our tool properly handles the full UTF-8 encoding pipeline.
What is URL-safe Base64?▼
URL-safe Base64 replaces '+' with '-' and '/' with '_' so the encoded string can be used in URLs and query strings without percent-encoding.
Is my data sent to your servers?▼
No. All encoding and decoding occurs strictly inside your local web browser session.
Quick Reference & Conversion Table
| Plain Text | Base64 Encoded | Byte Length | Base64 Length |
|---|---|---|---|
| A | QQ== | 1 Byte | 4 Characters |
| AB | QUI= | 2 Bytes | 4 Characters |
| ABC | QUJD | 3 Bytes | 4 Characters |
| Toolzy | VG9vbHp5 | 6 Bytes | 8 Characters |
| Hello World! | SGVsbG8gV29ybGQh | 12 Bytes | 16 Characters |
⚠️ Common Pitfalls to Avoid
- •Using standard browser `atob()` directly on UTF-8 strings without byte-level decoding, which triggers `DOMException: InvalidCharacterError` on non-Latin1 characters.
- •Confusing Base64 encoding with encryption; Base64 provides zero security and can be decoded by anyone.
- •Forgetting URL-safe Base64 variants where `+` and `/` are replaced with `-` and `_`.
💡 Practical Real-World Uses
- •Inspecting JSON Web Tokens (JWT) headers and claims during authentication debugging.
- •Embedding inline data URIs for small icons, SVGs, or fonts directly into CSS/HTML files.
- •Decoding email attachments and MIME headers encoded in base64 format.
Base64 vs Hexadecimal Encoding
| Attribute | Base64 | Hexadecimal (Base16) |
|---|---|---|
| Characters Used | 64 (A-Z, a-z, 0-9, +, /) | 16 (0-9, A-F) |
| Data Overhead | ~33% increase over binary | ~100% increase over binary (doubles size) |
| Case Sensitivity | Case-sensitive (A ≠ a) | Case-insensitive |
| Common Use | Data URIs, JWT tokens, email attachments | Color codes, memory addresses, cryptographic hashes |
Related Online Tools
Explore complementary calculators and converters with instant client-side execution
JSON Formatter & Validator (Beautify, Minify & Repair)
Format, beautify, validate, and minify JSON strings with instant syntax error detection and customizable indentation.
Diff Checker (Text Comparison & Difference Highlighter)
Compare two text files or snippets to highlight additions, deletions, and line-by-line differences instantly.
Binary to Decimal Converter (Base-2 to Base-10 Solver)
Convert binary numbers to decimal with step-by-step place-value expansions and conversions to hex and octal.
Case Converter – UPPER, lower, camelCase, Title
Transform text casing into UPPER, lower, Title Case, Sentence case, camelCase, snake_case, and kebab-case instantly.
Sentence Counter – Words, Sentences & Readability
Count sentences, words, paragraphs, and characters with reading time and readability metrics.
Tiny Text Generator – Small Caps, Subscript, Bubbles
Generate stylish tiny Unicode text including small caps, superscript, subscript, and bubble letters for social media.
Explore Other Tool Categories
Browse our full collection of 50 free web utilities
Unit Converters
Exact metric & imperial conversions for weight, length, temperature & volume.
Math & Education
Percentage changes, fractions, square roots, geometry & statistics.
Date & Time
Calendar arithmetic, business day intervals, stopwatch & multi-counter.
Home & Construction
Paint coverage, pool volume, topsoil, roof pitch, square footage & materials.