Base64 Encode
Encode text to Base64, right in your browser. No uploads.
What is Base64 Encode
Base64 encoding represents text or binary data using 64 characters (A-Z, a-z, 0-9, +, /). It is commonly used for email attachments and data URLs.
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Offline
- Works with the network disconnected
What Base64 actually does to your bytes
The text is first converted to UTF-8 bytes, then every three bytes are cut into four 6-bit groups and mapped onto the alphabet A–Z a–z 0–9 + /. When the input length is not a multiple of three, the tail is padded with one or two = signs so the output length stays a multiple of four. That is RFC 4648 section 4, and it is the only thing happening here — no compression, no encryption, no verification.
This browser API is the reason the byte step matters: btoa() accepts Latin-1 only and throws InvalidCharacterError the moment it meets a character above U+00FF. So every correct implementation converts to bytes first. A Chinese character costs three UTF-8 bytes, which become four Base64 characters; a plain ASCII letter costs one byte and lands on roughly 1.33 characters.
Where the + / = alphabet bites
Base64 output goes up by about a third, so a 3 MB file becomes a 4 MB string. If you are putting this into a URL, a filename or a JSON Web Token, the standard alphabet will be mangled: + turns into a space in a query string, / collides with path separators, and = confuses some routers. Use the URL-safe variant instead (- and _ with the padding dropped), which is what JWT does.
The other recurring mistake is treating the output as protection. Base64 is a transport encoding: anyone can decode it in one line, including anyone who intercepts it. If you need confidentiality the primitive is encryption with a key, and if you need tamper evidence it is an HMAC — not a longer alphabet.
When the output is not what a decoder expects
Line breaks are the usual culprit. Some tools wrap at 76 characters for MIME mail, others emit one unbroken line. Decoders that follow the spec ignore whitespace, but stricter ones (and many language runtimes' strict modes) reject it. If a downstream service says the Base64 is invalid while this page produced it, compare the two strings for wrapped lines before assuming corruption.
Trailing = padding is also frequently stripped by intermediaries, and while a tolerant decoder can reconstruct it, a strict one cannot. If you control both ends, keep the padding and keep the alphabet consistent — mixing standard and URL-safe Base64 across a pipeline fails silently more often than it fails loudly.
How to use
- 1.Enter your text
- 2.Click Convert
- 3.Copy the result
How this compares
There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.
| Aspect | This tool | Upload-based converters | Desktop software |
|---|---|---|---|
| Where the file is processed | In your browser, on this page | On the vendor's servers, after an upload | On your own machine, after installing an app |
| Account required | No | Usually — free tiers ask you to sign in before lifting a limit | No, though a licence may be needed |
| Size you can process for free | No size cap, no run limit | A few files per hour, or a ~5–10 MB cap before a paywall | Whatever your disk and RAM allow |
| Price | Free. Pro is $9/month, and only buys larger files and AI features | Usually a subscription — roughly $7–15/month as of November 2026 | A one-off licence, or a subscription |
| Works offline | Yes, once the page has loaded | No | Yes |
| Time before work starts on a 20 MB file | Immediate — there is nothing to upload | Dominated by the upload — about 16 s on a 10 Mbps uplink | Just the app launch |
| What it cannot preserve | Output is deterministic — verify it against any other implementation | The same — the conversion is the same maths | The same, though some desktop apps re-render styles more faithfully |
Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.
Frequently asked questions
What is Base64 encoding?
It is a way to represent data using 64 characters, useful when binary data must be handled as text.
Is my data uploaded?
No. Everything runs in your browser and nothing is sent to a server.
Does it support Unicode?
Yes. Text is encoded as UTF-8 correctly.
What this kind of conversion cannot keep
Encoding and hashing run through the browser's Web Crypto API or a pure-JavaScript implementation. The output is deterministic: the same input always produces the same digest, so you can verify a result against any other tool.
More in Encoding
On this page
- What is Base64 Encode
- What it does with your file
- How it actually behaves
- How to use it
- How this compares
- FAQ
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →