Base64 · Encode · Decode · Cast

Every byte, set in type.

Free online Base64 encoder & decoder — UTF-8 safe, auto-detects text or Base64.

base64deco — the type case job nº 001 idle
atob/btoa cannot speak UTF-8 — the bridge can
auto — paste text or Base64
Input
0 chars · 0 lines
Output
// Output appears here — the bridge detects your input automatically: // text → Base64, Base64 → text.
Image Workshop cast an image into the type case — data URL · Base64 · download
Drop an image here, or click to browse
no image cast yet Image workshop preview
85 original bytes, untouched
Download
§ 01 — FOUNDRY PRACTICES

Built for real-world payloads

The features you need when bytes meet text — multilingual copy, tokens, and API payloads.

UTF-8 Bridge

Native atob() mangles Chinese and emoji. Every conversion passes through TextEncoder / TextDecoder, so multi-byte characters survive intact — both ways.

Smart Sniffing

Paste anything. Base64 gets decoded, plain text gets encoded — structural hints and a test-decode settle ambiguous cases.

URL-Safe Mode

One toggle swaps + / for - _ so the output travels inside URLs, JWTs and filenames. The decoder accepts both variants automatically.

§ 02 — THE TYPE CASE

The 64-character alphabet

Every Base64 digit is one of these 64 sorts — index 62 (+) and 63 (/) are the two that change in URL-safe mode.

A–Z → 0–25 · a–z → 26–51 · 0–9 → 52–61 · + → 62 · / → 63 — 6 bits per character, 3 bytes per 4 characters.

when the payload lands in your lap

Developers and QA engineers constantly receive Base64 strings embedded in API responses, JWT headers, and email MIME parts. Instead of writing a throwaway script or firing up a REPL, paste the blob here and decode it immediately. The tool handles UTF-8 correctly, so multilingual content survives intact without mojibake. Toggle url-safe output when your payload contains plus signs or slashes that break in URL contexts. It is a fast, dependable workbench for inspecting and re-encoding data without leaving the browser tab.

from pasted string to decoded result

  1. Paste your Base64 string into the input area or click load into workshop.
  2. Choose format and quality settings to match your expected output type.
  3. Click Decode to convert the Base64 payload back to readable text.
  4. Toggle url-safe output if your input uses hyphens and underscores.
  5. Click Copy to grab the result or Swap to reverse the operation instantly.
§ 03 — FOUNDRY NOTES

Frequently Asked Questions

How do I encode text to Base64?

Paste or type your text into the input pane. Base64Deco detects plain text automatically and encodes it instantly — the output pane shows the Base64 string with character and byte counts. One click copies it to your clipboard.

How do I decode Base64 back to text?

Paste a Base64 string — with or without padding, with or without line breaks. The auto detector recognizes it as a Base64 payload and decodes it. You can also lock the direction with the Encode / Decode tabs, or swap the output back into the input to verify a round trip.

Why does atob() garble Chinese characters and emoji?

The browser's native atob() treats every character as one byte (Latin-1). Chinese and emoji are encoded as multi-byte UTF-8 sequences, so atob() splits them at the wrong boundaries and produces mojibake. Base64Deco bridges this: encoding goes through TextEncoder to get the UTF-8 byte stream before Base64 mapping, and decoding converts the bytes back through TextDecoder. Accented text like café and emoji survive every trip.

How does Auto mode detect what I pasted?

The sniffer checks two things in order. If the input contains characters outside the Base64 alphabet (Chinese text, punctuation, spaces) it is treated as text to encode. If it is pure Base64 alphabet characters, structural hints (padding, URL-safe characters) decide — and ambiguous cases are test-decoded: only clean, printable results count as Base64.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant replaces them with - and _ so the string can travel inside query parameters and paths. Toggle the url-safe switch before encoding, and the decoder accepts both variants automatically.

How much larger is Base64 than the original data?

Base64 maps every 3 bytes onto 4 characters, so the encoded output is about 4/3 (≈133%) of the input size, plus up to 2 padding characters. The output pane shows the exact growth factor for every conversion.

Is my data uploaded anywhere?

No. Encoding and decoding both run locally in your browser with client-side JavaScript. Nothing is transmitted, logged or stored — safe for tokens, logs, and customer data.

Browse the conversion library

Every unit pair has a dedicated page with the exact factor, a full value table and a worked example.

Latest Articles

Browser Memory Limits for Base64 Strings: Chrome vs Firefox vs Safari Thresholds
Before you paste that 180MB Base64 string into your JavaScript variable, do one thing: multiply the original file size by 1.37. That's your real memory footprint in the browser.
Does Base64 Encoding Inflate Emoji String Size? Calculating the Payload Bloat
The 3 AM Alert: Your API Payload Just Doubled in Size Your monitoring dashboard lights up. Payload sizes on the message endpoint spiked 40% overnight.
Why JavaScript btoa() Throws Invalid Character Errors with Emojis (and the Modern Fix)
You have a string. It contains an emoji. You want to Base64-encode it. So you do the obvious thing: btoa('Hello 🌍') The browser throws this at you: Uncaught DOMException: Failed to execute 'btoa' on…
Base64 vs UTF-8: Decoding the Difference Between Encoding and Character Sets
You paste a string into a Base64 decoder. The output looks like garbage—mojibake, question marks, replacement characters where your international text should be. So you blame the tool.
3 Ways UTF8 Safe Base64 Decoder Rescues Emoji Payloads
App rendering alien squares instead of laughing faces? Stop breaking emojis mid-transit. Use a utf8 safe base64 decoder rescuing real payloads. Read the fix!
3 Habits: UTF8 Safe Base64 Encoder Survives Emoji Payloads
Stop corrupting emojis in transit. See how a UTF8 safe base64 encoder handles real-world API payloads without data loss. Apply these 3 habits to your stack today.
Base64 Auto-Detect: Stop Mangling UTF-8 Emoji Payloads
Stop mangling real-world Base64 payloads with UTF-8 emoji support. Auto-detect safely decodes those tricky 🚀 webhook logs without crashing. Try it today!
Base64 API Payloads: Flawless UTF8 Emoji Decoding
Stop mangling data when decoding base64 API payloads. Learn our evidence-led method to auto-detect and decode strings with full UTF8 emoji support. Read it now.
Auto Detect Base64 Payloads: Fix Garbled Chat Emojis
Stop garbling chat emojis! Learn to auto detect and decode real world Base64 payloads with UTF8 support. Fix common decoding mistakes today. Read the guide!
How to Auto Detect and Decode Real World Base64 Payloads with Utf8 Safe Emoji Support
Last March, at 2:47 AM, a payment gateway webhook fired 11,432 times into our ingestion pipeline. Each payload carried a base64-encoded note field from merchants.
Auto-Detect Base64 Payloads: Decode UTF8 Emoji Safely
Auto-detect and decode real-world base64 payloads safely. This UTF8 browser tool ensures accurate emoji support, preventing data loss. Test the decoder now!
Base64 UTF-8 Emoji: 3 Tested 2026 Corruption Fixes
Safely encode UTF-8 strings with emojis to Base64 without character corruption. We tested 4 tools, exposing 3 flaws. See the data-backed fix and apply it now!
How to safely decode Base64 strings with emoji support using a UTF-8 safe browser-based tool
Here's the scene: your backend hands you a Base64-encoded payload from a chat message. You decode it in the browser using atob() , drop the result into a div , and instead of seeing "Hey 👋 let's…
Base64 Decoding Breaks API Emojis: Manual vs Auto-Detect
Base64 decoding breaking UTF-8 emojis in API payloads? We weigh manual fixes against an auto-detect tool. Compare evidence side-by-side and fix data today.
How to Auto Detect and Safely Decode Real World Base64 Payloads Containing Utf8 Characters and Emojis
Most engineers I've worked with share the same first instinct: slap a regex like /^[A-Za-z0-9+\/]*={0,2}$/ on the incoming string, check that its length is a multiple of 4, and call it base64.
2 Methods Encode UTF-8 Emoji Payloads Base64 Securely
Compare two methods to securely encode UTF-8 emoji payloads to Base64 in JavaScript. See why btoa fails while TextEncoder works. Try our browser tool today!
Safely Decode Base64 UTF8 Emojis: 3-Step Auto-Detect
Stop corrupted text outputs. Learn exactly how to auto-detect and safely decode real world Base64 payloads containing UTF8 emojis. Grab the 3-step checklist!
Encode Emojis Base64: 2026 UTF-8 JS Tool Survives 1k Tests
Safely encode emojis to base64? I tested this 2026 UTF-8 safe JavaScript tool against 500 real-world payloads. Zero data loss. Test the browser encoder now!
5 Base64 Image Encoder Mistakes Slowing Web Performance
We profiled our app's base64 image encoders and found hidden render delays. Apply these best practices to boost web performance and fix bloated payloads today.
Stop Corrupting Base64 Data URL Downloads Client-Side
Struggling to convert Base64 data URLs back into downloadable files client side? Stop corrupting your exports. Avoid these common pitfalls and fix it today!
Base64 URL Safe vs Standard: Fix Broken API Tokens
Standard Base64 breaks URLs using + and / symbols. Learn the difference between standard base64 and url safe base64 string encoding to fix tokens. Read now!
Extracting and Decoding Base64 Encoded HTTP Headers for Web Debugging
Base64 has no delimiters, so most header decode failures are extraction errors. Where the payload boundary sits in Basic, Bearer, cookie and proxy headers, plus the modulo-4 rule.
Why Does My Decoded Base64 String Show Weird Utf8 Characters
You've just shipped what you thought was a clean data pipeline. An API hands you a Base64-encoded payload, you run it through your trusty decoder, and suddenly your terminal is vomiting strings like “Hello†instead of "Hello" .
Base64 Limits: Stream Chunks vs. Blocking 500MB Uploads
Converting 500MB files to Base64 strings hits browser memory limits, crashing tabs. Stop freezing uploads: discover why streaming chunks beats blocking. Try it!
Decode Unknown Base64 Payloads JavaScript: 5-Minute Fix
Auto detect and decode unknown base64 payloads in JavaScript safely. We analyze 3 common pitfalls via one concrete worked example with real numbers. Read now.
Is Base64 Encoding Secure Enough for Transmitting Sensitive API Tokens
That number comes from a 2023 analysis of misconfigured CI/CD pipelines, and honestly, it tracks with what I see every day in Base64 utility workflows.
Converting Transparent Png Images to Base64 Data URLs for Inline CSS
Most developers have memorized the statistic by now: Base64 encoding inflates file size by approximately 33%.
How to Safely Encode Emojis to Base64 Without Corrupting Utf8 Data
Last Tuesday, a junior dev on my team pushed a notification microservice that serialized user messages into base64 for transport between our API gateway and a mobile client. Simple enough.
How to Use an Auto Detect Base64 Decoder with UTF8 Emoji
Learn how to use an auto detect base64 decoder with utf8 safe emoji support. Decode strings accurately without breaking emojis. Try our free online tool now!
UTF-8 Safe Base64 Encoder for Emoji & Unicode Strings
Learn how to encode Unicode strings with a UTF-8 safe Base64 encoder. Ensure perfect emoji support and prevent data corruption. Try our free online tool today!

View All Articles →