Base64 Encoder-Decoder

Encodes text to Base64 or decodes it back. Supports the standard and URL-safe (base64url) variants and is UTF-8 aware. The conversion happens entirely in your browser; the text is not sent to a server.

Mode
Variant
Standard Base64 uses +, / and =. base64url replaces these with -, _ and drops the padding; it is safe in URLs and JWTs. Decoding auto-detects both variants.
Input
Enter the text to encode or decode. The output updates as you type.

Output

Enter text in the field on the left; the result appears instantly.

Frequently Asked Questions

Is Base64 an encryption method?

No. Base64 is an encoding, not encryption — it provides no confidentiality. Anyone can decode it without a key. Its purpose is to carry binary data safely through text-only channels (URLs, JSON, email, data URIs).

What is the difference between Base64 and base64url?

The standard Base64 alphabet uses + and / as characters 62 and 63 and adds = for padding. base64url replaces those two characters — which are problematic in URLs and file names — with - and _, and usually drops the padding. The three parts of a JWT are base64url-encoded. This tool auto-detects both variants when decoding.

Why does Base64 make data larger?

Base64 turns every 3 bytes into 4 ASCII characters, which is roughly a 33% size increase. That is why Base64 is not efficient for storing or transferring large files — it suits small embedded data (icons, certificates, tokens).

How do I use Base64 in .NET?

Convert.ToBase64String(byte[]) encodes and Convert.FromBase64String(string) decodes. For text, first convert it to bytes with Encoding.UTF8.GetBytes. .NET 9+ adds a Base64Url class that supports the URL-safe variant directly.

Are UTF-8 characters preserved correctly through Base64?

Yes — as long as the text is first converted to UTF-8 bytes. That is exactly what this tool does: text with Turkish, Arabic or emoji characters round-trips faithfully through encode and decode. Wrong encoding (e.g. assuming Latin-1) causes corruption.