Base64 encode

Type or paste any text and get its Base64 encoding instantly, with UTF-8 support, an optional URL-safe alphabet and optional line wrapping.

  • Free
  • No sign-up
  • Runs in your browser
base64-encode

100% private — everything is converted in your browser and nothing is uploaded.

Files and images

Encode a file to Base64

100% private — everything is converted in your browser and nothing is uploaded.

How it works

Type or paste your text

Anything goes: plain text, JSON, an API key, accented characters or emoji.

Choose the options

Standard Base64 by default; tick URL-safe to use - and _ and drop the padding.

Copy the result

The encoded text is ready to copy as soon as you type.

How to encode text to Base64

To encode text to Base64, type or paste it into the input box with Text to Base64 selected. The Base64 version appears immediately in the output box, ready to copy. Text is converted to UTF-8 bytes first, so accents, symbols and emoji are handled correctly. Nothing is uploaded: the encoding runs in your browser.

What is Base64?

Base64 is a way of writing any binary data using only 64 safe characters: the letters A to Z and a to z, the digits 0 to 9, plus and slash. Every 3 bytes of input become 4 characters of output, so encoded data is about 33% larger. It exists because many systems, such as email, JSON and URLs, were designed for text and can break on arbitrary bytes.

Base64 examples

Base64 examples
TextBase64Bytes
AQQ==1
HiSGk=2
ManTWFu3
HelloSGVsbG8=5
Hello, World!SGVsbG8sIFdvcmxkIQ==13
Grüße, Welt!R3LDvMOfZSwgV2VsdCE=14
€4oKs3

How the padding works

Base64 padding rules
Input lengthPadding addedExample
Multiple of 3 bytesnoneMan → TWFu
1 byte overtwo = signsA → QQ==
2 bytes overone = signHi → SGk=

When to use Base64

  • Sending binary data inside JSON or XML.
  • Embedding small images in HTML or CSS as data URIs.
  • HTTP Basic authentication headers, which carry username:password in Base64.
  • Storing keys and certificates in text formats such as PEM.

Base64 is not encryption

Anyone can decode Base64 in one step, so it provides no secrecy at all. Never use it to hide passwords or personal data; use real encryption for that. Its job is transport, not protection.

Private by design

The conversion runs in your browser. What you type, paste or drop is never uploaded, which matters when the text holds tokens, personal data or internal files.

Frequently asked questions

What is URL-safe Base64?
It replaces + with - and / with _, and usually drops the = padding, so the result can be placed in a URL or filename without escaping. JSON Web Tokens use this variant.
Why does my Base64 end with = signs?
The = signs are padding that make the length a multiple of four. One or two of them at the end are normal, depending on how many bytes were left over.
Does it handle accents and emoji?
Yes. Text is encoded as UTF-8 before Base64, which is the usual convention, so characters such as ü, ç or € decode back exactly.
Is this converter free?
Yes. There is no sign-up and no limit, and it runs in your browser, so nothing you type is sent to a server.
Does it work on a phone?
Yes. It works in any modern mobile browser, and the result updates as you type.