Base64 String Encoder & Decoder Online — Free
Runs 100% in your browser — your files never leave your device.
Base64 shows up everywhere: data URIs, email attachments, JWT segments, config files. Type text to encode it, paste base64 to decode it — both directions work live, with optional URL-safe alphabets and automatic data: prefix stripping. Unicode text round-trips correctly, and nothing you paste leaves the page.
How it works
- 1
Type or paste
Encode plain text or decode a base64 string — both panels work live.
- 2
Toggle URL-safe if needed
URL-safe mode swaps +/ for -_ and drops padding.
- 3
Copy the result
One click copies the encoded or decoded output.
About this tool
What base64 actually is
Base64 encodes any bytes into 64 safe characters — letters, digits, plus, and slash — using four characters per three bytes. It is a transport format, not encryption: anyone can decode it, and encoded data is larger than the original by a third.
Where it appears
Data URLs, HTTP Basic credentials, email attachments, JSON web tokens, and API fields that must carry binary-ish content through text-only channels. If a system mangles bytes, base64 is the standard way to sneak them through safely.
Round-trip honesty
Encode then decode returns your original text exactly, including Unicode — the tool handles the UTF-8 step that browser btoa historically fumbled. Pad characters (=) at the end are normal; some systems strip them, and decoding works either way here.
Frequently asked questions
Is base64 encryption?
No — it is a reversible encoding with no key. Never treat base64 as protection; its job is safe transport through text-only channels.
Why is my encoded text longer than the input?
Base64 spends four characters per three bytes — about a 33 percent size increase. That is the cost of fitting bytes into a text-safe alphabet.
Why does my decoded text look like garbage?
The base64 string encoded bytes that are not UTF-8 text — binary data or a different character encoding. Decoding worked; the bytes were not text to begin with.