Base64 Encode

Convert any text — including Unicode, emoji, and multi-byte characters — to Base64-encoded output. Supports standard Base64 (RFC 4648 §4) and URL-safe Base64URL (RFC 4648 §5). Runs entirely in your browser — no data is ever sent to a server.

0 bytes

Type or paste text here to encode it as Base64

This is the Base64-encoded output. Copy to use elsewhere.

Base64 is not encryption
Base64 is an encoding scheme, not encryption. Anyone with the encoded string can decode it instantly. Do not use Base64 to protect sensitive data.

About Base64 Encoding

Base64 encoding converts arbitrary binary data into a string of 64 printable ASCII characters. It is defined in RFC 4648 and is one of the most widely used encoding schemes on the internet.

The RFC 4648 Alphabet

The standard Base64 alphabet uses 64 characters: uppercase A–Z, lowercase a–z, digits 0–9, plus + and /. The = character is used for padding. Every 3 bytes of input produce 4 characters of output — a ~33% size overhead.

Base64URL Mode (RFC 4648 §5)

Base64URL replaces + with - and / with _, and removes = padding. This variant is safe to embed directly in URLs and filenames without percent-encoding. It is used in JWTs, OAuth tokens, and data URIs.

Common Use Cases

  • HTTP Basic Authentication — credentials are Base64-encoded in the Authorization header
  • JSON Web Tokens (JWT) — header and payload are Base64URL-encoded
  • Data URIs — embed images and files directly in HTML or CSS
  • Email attachments (MIME) — binary attachments are Base64-encoded for text-safe transport
  • OAuth tokens and API keys — URL-safe encoding for query parameters

UTF-8 and Unicode Support

This tool uses the browser's native TextEncoder API to convert your input to its full UTF-8 byte sequence before encoding. This means emoji (e.g. 😀 encodes as 8J+YgA==), accented characters (e.g. é encodes as w6k=), and any non-Latin script are all handled correctly.

Code Cultivation • © 2026