Skip to content
Convertitive

Base64 Encoder & Decoder

Encode text → Base64, or decode Base64 → text. UTF-8 throughout.

Base64 is the standard way to pack arbitrary bytes — text, image fragments, JSON payloads — into characters that survive every ASCII-only transport: email, URLs, JWT segments, JSON strings. The encoder below handles full Unicode (including emoji), supports both the standard alphabet and base64url (URL-safe, no padding), and runs entirely in your browser. Nothing you paste leaves this page.

Alphabet
Q29udmVydCBhbnl0aGluZywgaW5zdGFudGx5Lg==

How to use

  1. Pick a direction

    Choose Encode to turn text into Base64, or Decode to read a Base64 string back as text.

  2. Choose the alphabet (encoding only)

    Standard for emails, data URIs, HTTP Basic Auth. base64url for JWTs, signed cookies, and anything that travels in URLs.

  3. Paste your input

    The output appears instantly as you type. Click the copy icon to grab the result.

Common patterns

Frequently asked questions

What is Base64?
Base64 represents binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). Each three bytes of input become four Base64 characters, plus padding ('=') at the end to reach a multiple of four.
What is base64url?
A URL-safe variant defined in RFC 4648 §5. It replaces + with - and / with _ so the encoded value is legal inside a URL without further escaping. Padding (=) is conventionally stripped because trailing equals signs sometimes confuse path parsers.
Does Base64 compress or encrypt my data?
Neither. It strictly grows the size by 33% (4 output bytes per 3 input bytes), and the transformation is fully reversible by anyone — it is not a security mechanism.
Does the encoder handle emoji and non-ASCII characters?
Yes. The input is first encoded as UTF-8 bytes, then those bytes are Base64-encoded. Decoding does the inverse and validates that the result is well-formed UTF-8 before returning it.
Is the data sent to a server?
No. The entire encoder and decoder runs in your browser as static JavaScript. Convertitive never logs, stores, or transmits any of your input.
What's the maximum input size?
Any size your browser can hold in memory. Practical limit is roughly tens of megabytes before the page becomes sluggish; for huge files use a command-line tool.
Why am I getting 'Input contains characters outside the Base64 alphabet'?
The input has characters that aren't A–Z, a–z, 0–9, +, /, -, _, or =. Common culprits are accidental quotation marks, spaces inside the string (we ignore whitespace at the edges), or curly quotes pasted from word processors.

About

How the encoding works

Base64 groups the input bytes in chunks of three (24 bits) and emits four 6-bit Base64 digits. When the input length is not a multiple of three, the encoder pads the final group with zero bits and appends one or two '=' characters so the output length is always a multiple of four. base64url skips the padding because URL parsers do not need a fixed length.

When NOT to use Base64

Base64 is for transport, not storage or compression. If your data is binary and your transport is binary-safe (raw HTTP body, gRPC, S3), send the raw bytes. If you need confidentiality, encrypt first and then Base64-encode the ciphertext only if your channel requires it.