Base64 Encoder Online
Runs in your browserEncode text to Base64 online for free. Encode again to nest layers, choose standard or URL-safe output, then copy or download. Runs in your browser.
Base64 Encoding at a Glance
Base64 turns any bytes into 64 safe characters. These are the facts the encoder follows.
| Item | Detail |
|---|---|
| Standard alphabet | A-Z, a-z, 0-9, + and /. Used by MIME email, data URIs and most APIs. |
| URL-safe alphabet | The same letters, with - and _ instead of + and /. Safe inside links and filenames. |
| Padding | The = sign fills the output to a multiple of 4 characters. URL-safe output often leaves it out. |
| Size | Every 3 input bytes become 4 output characters, so the result is about 33% longer. |
| Text encoding | Text is converted to UTF-8 first, so accented letters, emoji and non-Latin scripts encode correctly. |
| Example | Hello becomes SGVsbG8=. |
How to Use the Base64 Encoder Online
- Paste your text
Type or paste the text, JSON, or snippet you want to encode into the box.
- Choose settings if needed
Open Settings to pick the standard or URL-safe alphabet, keep or drop the = padding, and set a line length. Defaults are standard, padded, and one long line.
- Press Encode Base64
The box now shows the Base64 output. Press Encode again to encode the result a second time, and use Undo to step back.
- Copy or download
Use Copy to place the output on your clipboard, or Download to save it as a text file.
When to Encode Text as Base64
Use Base64 when text or binary data has to pass through a channel that only handles plain text. Typical cases are embedding a small image in HTML or CSS as a data URI, putting a value into an HTTP header or JSON field that cannot hold raw bytes, and writing attachments into email. Developers also encode configuration values and test payloads this way.
Encode once for a single conversion. Press Encode again only when a specification asks for nested encoding, because each extra layer makes the text about a third longer. If you are not sure whether a value is already encoded, try the Base64 decoder first.
Pick the alphabet by destination. Use URL-safe output for tokens, query strings, filenames and anything in a link, where + and / would be misread. Use standard output for MIME, data URIs and most APIs that document RFC 4648 section 4.
Things to Know
Privacy
Encoding runs in your browser. The text you type is never uploaded, logged or stored. Settings are kept only while this page is open.
Frequently Asked Questions
How do I encode text to Base64 online?
Paste the text into the box and press Encode Base64. The Base64 result replaces the text in the box, ready to copy or download.
Is this Base64 encoder free?
Yes. It is free to use, with no sign-up and no limit on how much you encode.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses + and /. URL-safe Base64 uses - and _ instead, so the output can sit inside a URL or filename without escaping. Open Settings to choose.
Why is the Base64 output longer than my text?
Base64 represents every 3 bytes with 4 characters, so the output is about 33% larger. Padding characters at the end can add one or two more.
Does the encoder handle emoji and non-English text?
Yes. The text is converted to UTF-8 bytes before encoding, so accented letters, emoji and other scripts round-trip correctly through the decoder.
Is my text sent to a server?
No. Encoding happens in your browser. Nothing you type is uploaded, logged or stored.