Base64 Encode - Text to Base64

Paste any text - English, Thai, emoji, JSON, XML, code - and get its Base64 form instantly. Choose the character set the receiving system expects, make the result URL-safe or wrap it at 76 characters for e-mail (MIME).

Runs in your browser - nothing is uploaded Free, no sign-up Instant, works offline once loaded
Text
0 characters
Base64

How to use the Text to Base64 tool

  1. Paste or type your text in the Input box.
  2. Pick options if you need them: character set (UTF-8 is right in most cases), URL-safe, no padding, line breaks.
  3. Copy the Base64 result or download it as a .txt file.

Questions and answers

Which character set should I choose?

UTF-8 for almost everything on the web and in APIs. UTF-16LE is what Windows and .NET use internally; Latin-1 (ISO-8859-1) only for old systems that expect one byte per character.

What does URL-safe Base64 mean?

It replaces + with - and / with _ so the result can go into a web address or file name without escaping. It is also called base64url (RFC 4648 section 5) and is used in JWT tokens.

What are MIME line breaks?

E-mail standards (MIME) limit lines to 76 characters. Turn on line breaks when the Base64 goes into an e-mail or a PEM file (64 characters).

Is my data uploaded to a server?

No. Every conversion on this page runs inside your browser with JavaScript. Your text and files never leave your computer, which is why it also works for private keys, contracts and photos.

Is the tool free?

Yes, free without sign-up and without limits other than your computer's memory. The site is paid for by the small ads on the left and at the bottom.

Related tools

Ad