Base64 Encode

Turn any text into Base64, including accented letters and emoji. Switch on URL-safe output for tokens and links, or wrap lines at 76 characters for email-style blocks.

Use the tool

Why this tool exists

Base64 turns arbitrary bytes into plain ASCII, which is why it turns up in Basic auth headers, data URIs, config files and email attachments. The classic trap is btoa() in the browser console, which throws on any character outside Latin-1, so a name like "Zoë" or an emoji breaks it.

This tool encodes your text as UTF-8 first, so non-English text round-trips correctly. It offers the URL-safe variant used in JWTs and query strings, and an optional 76-character wrap for MIME-style output. Everything happens locally, so credentials and snippets you encode are not uploaded.

How to use it

  1. Type or paste the text you want to encode into the Text box.
  2. Tick "URL-safe" if the result will go into a URL, cookie or JWT part.
  3. Tick "Wrap at 76 chars" if you need MIME-style line breaks.
  4. Copy the Base64 result.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 is a reversible encoding that anyone can decode in a second. Do not use it to hide passwords or secrets. It exists only to carry binary or special characters through text-only channels.

What does URL-safe change?

It swaps + for - and / for _, and removes the = padding at the end. Those characters are safe in URLs and filenames without further escaping. You must decode with a URL-safe aware decoder; the Base64 Decode tool accepts both.

Why does my output differ from another tool?

The usual cause is a different character encoding. This tool encodes text as UTF-8, which is the modern standard. A tool that uses Latin-1 or UTF-16 produces different bytes, and therefore different Base64, for any non-ASCII character.

Can I encode a file or image?

This page encodes text only. For images, use the Image to Base64 tool, which produces a data URI you can paste into HTML or CSS.