Every byte, set in type.
Free online Base64 encoder & decoder — UTF-8 safe, auto-detects text or Base64.
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.
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
- Paste your Base64 string into the input area or click load into workshop.
- Choose format and quality settings to match your expected output type.
- Click Decode to convert the Base64 payload back to readable text.
- Toggle url-safe output if your input uses hyphens and underscores.
- Click Copy to grab the result or Swap to reverse the operation instantly.
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.