Search tools

Base64 Encode

Encode text to Base64 or Base64URL, with full Unicode support.

Encode

Base64

Standard or URL-safe

  • Standard Base64: Uses + and / and pads with =. This is what most tools and email expect.
  • Base64URL: Uses - and _ instead and leaves out the padding, so the result can go into URLs and file names unchanged, as in JSON Web Tokens.
  • Not encryption: Anyone can decode Base64. Never use it to hide passwords or personal data.

Frequently asked questions

Why does Base64 make text longer?

Every 3 bytes become 4 characters, so the result is about a third larger than the UTF-8 input.

Why do other tools give a different result for emoji?

Some encode text in another character set or fail on characters outside Latin-1. This tool always uses UTF-8, the encoding used by the web.

Can I encode a file?

Yes: Encode a file turns any file, such as an image, into Base64, or into a data URI that starts with data: and its type. The file is read on this device.