Skip to content

Base64 encoder & decoder

Convert UTF-8 text with the standard or URL-safe alphabet—locally and without file uploads.

Text and format

Processed in your browser.

Whitespace in encoded input is ignored. Text is encoded as UTF-8.

The gray text is a worked example. Convert uses it; focusing any field clears it for your own text.

Converted text

Choose a direction, enter text, then convert.

How to encode and decode

Choose standard Base64 or Base64url, then choose a direction. Unicode and emoji are first converted to UTF-8 bytes. Decode accepts pasted line breaks but returns an error for malformed data or bytes that are not valid UTF-8 text.

Alphabet and padding

Standard Base64 uses A–Z, a–z, 0–9, + and /, usually with = padding. Base64url replaces + and / with - and _; this page omits trailing padding when encoding and accepts valid padded or unpadded URL-safe input.

Example

The UTF-8 text “café 🐭” round-trips without losing accents or emoji. Plain “Hello” encodes as SGVsbG8= in standard mode and SGVsbG8 in Base64url mode.

Limits and FAQ

Base64 is reversible representation, not encryption or password protection. This page handles text only, not file conversion or data URLs. Invalid trailing bits and invalid UTF-8 bytes are rejected rather than silently changed.

Which alphabet should I choose?

Use standard Base64 for email bodies, JSON fields, certificates, and formats that explicitly request Base64. Use Base64url for URL paths, query values, cookies, or token parts that require the URL-safe alphabet. Match the format expected by the receiving system; changing alphabets is not a security feature.

A safe round-trip workflow

Keep the same alphabet for encoding and decoding. After decoding, verify the readable text before using it. Secrets remain secrets only if they were protected before encoding: anyone can reverse Base64, and encoded passwords or API keys should be treated exactly like the originals.