Base64 Encoder / Decoder
Convert text to Base64 strings and back securely in your browser.
Missing a tool?
Tell us what you'd like us to build next. We read every suggestion, and your email is optional.
What this tool does
The Base64 Encoder / Decoder turns text or files into Base64 and turns Base64 back into text or a file. It handles any language and emoji (as UTF-8), standard and URL-safe Base64, and data: URLs.
How to use it
- Type or paste text and click Encode to Base64, or paste Base64 and click Decode from Base64.
- Tick URL-safe output for Base64 that can go in a link or filename.
- To encode a file, click Choose a file; tick As a data: URL to get a string you can put straight into HTML or CSS.
- If the Base64 you decode is a file rather than text (an image, say), the tool offers it as a download.
What Base64 is
Base64 writes any data using just 64 safe characters (A-Z, a-z, 0-9, + and /), with = as padding at the end. That lets binary data travel through systems built for text, like email, JSON or HTML. Every 3 bytes become 4 characters, so Base64 is about a third bigger than the original.
Standard vs URL-safe
The + and / characters have special meanings in URLs, so the URL-safe variant (called "base64url") uses - and _ instead, and usually drops the = padding. You'll see it in web tokens (JWTs) and links. This tool decodes both kinds automatically.
A worked example: "Hi!"
- Each character becomes a byte: H = 72, i = 105, ! = 33.
- In binary that's 01001000 01101001 00100001: 24 bits.
- Split into four groups of 6 bits: 010010, 000110, 100100, 100001, which are 18, 6, 36 and 33.
- Look each number up in the Base64 alphabet (A-Z are 0-25, a-z are 26-51, 0-9 are 52-61, then + and /): S, G, k, h.
So "Hi!" becomes SGkh. Every 3 bytes of input always become 4 characters.
Frequently asked questions
Is Base64 encryption?
No. Anyone can decode it instantly; it just changes how data is written. Never use it to hide passwords or secrets.
Should I embed images as Base64?
For small icons, a data: URL saves a separate download. For larger images it usually hurts: the file gets about a third bigger and can't be cached separately. Files over 10 MB aren't accepted here.
Is my data sent anywhere?
No. Encoding and decoding happen in your browser.
Why does Base64 often end with = or ==?
Base64 works in groups of 3 bytes. When the data doesn't divide evenly, the last group is padded: one = means one byte was missing, == means two. "Hi" (2 bytes) becomes SGk= and "H" becomes SA==.
How much bigger is the result?
About a third bigger, because 3 bytes become 4 characters: a 300 KB image becomes about 400 KB of Base64 text.
Sources: IETF, RFC 4648: The Base16, Base32, and Base64 Data Encodings (Base64 and base64url); MDN Web Docs, Base64 and data: URLs. Last reviewed on SuiteWebTools: October 2026.