TextyConverterbeta
⌘K

Base64 Encoder

Encode text as Base64 — the standard way to safely embed binary data in text-only contexts. Unicode-aware.

0 characters
0 characters

About Base64 Encoder

Base64 encodes bytes into a sequence of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /, with = for padding). It's the standard way to embed binary data — images, certificates, raw bytes — in JSON, URLs, email headers, and other text-only contexts. This tool encodes your input as UTF-8 bytes first, then Base64, so non-ASCII text round-trips correctly.

When to use it

  • Embedding an image or font as a data URI in CSS
  • Encoding binary content for inclusion in JSON or YAML
  • Producing a Base64 payload for an HTTP Authorization header
  • Sending Unicode strings through systems that mishandle multi-byte characters

How it works

The input string is encoded as UTF-8 via TextEncoder, then the byte sequence is converted to Base64 via btoa. The output uses the standard alphabet with '=' padding.

Examples

Hello, world!
SGVsbG8sIHdvcmxkIQ==
Unicode characters encode as their UTF-8 bytes
café 🎉
Y2Fmw6kg8J+OiQ==

Frequently asked questions

Is the output URL-safe?
No — standard Base64 uses + and /, which are reserved in URLs. For URL-safe Base64 (- and _), post-process with find-and-replace.
Does it handle Unicode?
Yes. The input is encoded as UTF-8 before Base64 encoding, so emoji and non-Latin scripts survive the round-trip via base64-decode.
Is Base64 encryption?
No. Base64 is reversible by anyone. Use it to make data transport-safe, never to keep it secret.

Related tools