You are offline. Tools you have opened before keep working.
Base64 encode
Convert text to Base64 instantly. Accented letters, other alphabets and emoji are encoded correctly as UTF-8, and you can switch to URL safe output for tokens and addresses.
Free and private. Everything runs in your browser, nothing is uploaded.
TXT
Base64
Report a problem
How it works
Paste your textType or paste into the input box, or open a text file. Sample shows an example.
Check the resultThe result appears on the right as you type. Errors are shown with the line and column.
Copy or swapCopy the result, download it as a file, or press Swap to reverse the direction and check it.
When to encode text as Base64
Base64 is used to put text or binary data where only simple characters are allowed: HTTP Basic authentication headers, JSON fields, email attachments, environment variables and data URIs.
Turn on 76 character lines for email and PEM style output. Turn on URL safe output when the result goes into a web address or a JWT token.
About Base64
Base64 writes binary data using 64 safe characters: A to Z, a to z, 0 to 9, + and /. Every 3 bytes become 4 characters, so the result is about a third larger than the original.
Frequently asked questions
How do I make a Basic authentication header?
Encode username:password and put Basic and a space in front of the result. Remember that this is not encryption, so always use HTTPS.
Is my text uploaded anywhere?
No. Encoding and decoding happen in your browser. Tokens, keys and other private text never leave your device.
Is Base64 encryption?
No. Base64 only changes how data is written. Anyone can decode it, so never use it to protect passwords or secrets.
What is URL safe Base64?
It replaces + and / with - and _ and drops the = padding, so the result can be used in addresses and file names. It is used in JWT tokens, for example. The decoder accepts both forms.
Why does decoding show a file instead of text?
If the decoded data is not readable text, the tool checks what kind of file it is. Images are previewed, and any file can be downloaded with the Download button.
Does it work offline?
Yes. After you open the page once, it keeps working without an internet connection.