Base64 Encode

Convert text into Base64 securely on the server.

What Base64 is actually for

Base64 takes arbitrary data and re-expresses it using only 64 characters that survive being sent through systems designed for plain text. That is the whole purpose: email headers, URLs, JSON fields, XML documents and HTTP headers all have characters they treat specially, and Base64 sidesteps every one of them by using only letters, digits, plus, slash and the equals sign for padding.

It is worth being clear about what it is not. Base64 is an encoding, not encryption. Anyone can decode it in a second, and this page has a decoder too. Encoding a password in Base64 protects it from nothing; it only makes it transportable.

Encoding text to Base64

  1. Paste or type the text you want to encode into the input box.
  2. Press the encode button.
  3. Copy the Base64 output from the result box.
  4. Paste it wherever it is needed — an HTTP header, a data URI, a config file or an API field.
  5. Use the matching decoder if you need to turn Base64 back into readable text.

How this encoder behaves

  • Standard Base64 — output follows RFC 4648, so it is accepted by any compliant decoder.
  • UTF-8 aware — accented characters, emoji and non-Latin scripts encode and round-trip correctly.
  • Correct padding — trailing equals signs are added as the specification requires.
  • No length limit — encode a single word or a large block of text.
  • Runs on the server — the text is sent to our server to be encoded and is not stored.
  • Decoder included — convert in both directions without leaving the site.

Where you will meet Base64

  • HTTP Basic authentication headers, which are literally username:password in Base64.
  • Data URIs that embed a small image directly in CSS or HTML instead of requesting a separate file.
  • Email attachments, which are Base64-encoded before transmission by MIME.
  • JSON Web Tokens, whose header and payload segments are Base64url-encoded.
  • Configuration files and Kubernetes secrets, where values are stored Base64-encoded.

Base64 questions

Is Base64 a form of encryption?

No, and this matters. Base64 is a reversible encoding with no key and no secret. Anyone who sees the string can decode it instantly. Never use it to protect passwords, tokens or personal data — use real encryption or transport security for that.

Why does Base64 output end in one or two equals signs?

Base64 works on three-byte groups. When the input length is not divisible by three, padding characters are appended so the output length is a multiple of four. One or two equals signs at the end is normal and expected.

Why is the encoded string longer than the original?

Base64 represents every three bytes as four characters, so the output is about 33% larger. That overhead is the price of being safe to transmit through text-only channels.

What is the difference between Base64 and Base64url?

Base64url replaces the + and / characters with - and _ so the result is safe inside a URL or filename. JSON Web Tokens use the url-safe variant.

Can I encode an image or a PDF?

Yes, binary files are commonly Base64-encoded, which is how data URIs work. Bear in mind the result will be a third larger than the original file, so it is only practical for small assets.

Cookie
We care about your data and would love to use cookies to improve your experience.