Base64 Encoder
Encode text to Base64, including emoji and every alphabet, with a URL-safe option.
Runs in your browser — nothing you type is sent anywhere
Standard Base64. Turn on the URL-safe alphabet if the result will go into a link, since + and / both need escaping there.
Base64
The result appears here as you type. Nothing is sent anywhere — the work happens in this page.
About the Base64 Encoder
Base64 turns arbitrary data into sixty-four characters that survive being sent as plain text. It is not encryption and it hides nothing — anyone can decode it instantly — but it is what lets a token travel in an HTTP header, an image sit inside a CSS file, or an attachment cross an email system that only understands text.
The part that trips people up is not Base64 itself but the encoding underneath it. The browser's built-in function works on bytes and refuses anything above the basic Latin range, so encoding a single accented letter throws an error, and the common workaround produces bytes that other languages decode into something different. This tool converts text to real UTF-8 first, so an emoji or a line of Hindi encodes to exactly what any correct implementation elsewhere would produce.
The URL-safe option swaps the two characters that cause trouble in links. Standard Base64 uses plus and slash, both of which have their own meaning inside a URL and have to be escaped; URL-safe Base64 uses hyphen and underscore instead and drops the trailing padding. If the result is going into a query string, a filename or a JWT, that is the variant you want.
Line wrapping at seventy-six characters is there for the older standards that require it, notably MIME email. Everything runs in the page, so a token or a key you are encoding never leaves your device.
How to use the Base64 Encoder
Paste your text
Anything at all — plain text, JSON, a key. It is encoded as you type, with no button to press.
Pick the alphabet
Leave it standard for general use, or switch to URL-safe if the result is going into a link, a filename or a token.
Wrap if you need to
Turn on line wrapping when the output is destined for an email header or another format that requires 76-character lines.
Copy the result
Copy it to your clipboard, or download it as a text file if it is long.
Frequently asked questions
Is Base64 a form of encryption?
Why do emoji and accented letters break in other Base64 tools?
What is URL-safe Base64?
Why is the Base64 longer than what I put in?
Is my text sent to a server?
You may also need
Base64 Decoder
Decode Base64 back to text, accepting URL-safe input, missing padding and stray whitespace.
JWT Decoder
Read the header and claims inside a JSON Web Token, with expiry shown in plain language.
Hash Generator
Produce a SHA-256, SHA-384, SHA-512 or SHA-1 digest, and check it against a known value.
JSON Formatter
Format, validate and minify JSON — with the exact line and column of any error.