deftools.io Developer Tools

🔐 Base64 Encode/Decode

Encode text to Base64 or decode Base64 back to text. Unicode-safe, URL-safe mode, file support.

0 chars · 0 B
0 chars · 0 B

About this tool

Base64 is a binary-to-text encoding that represents arbitrary bytes using 64 ASCII characters, so binary data can pass through channels designed for text: JSON payloads, data URIs, Authorization: headers, or email attachments (MIME).

Example: Hello, world! encodes to SGVsbG8sIHdvcmxkIQ==. Paste either side into the input — with auto-detect enabled the tool picks the right direction.

The URL-safe variant replaces + with - and / with _ and drops the padding, so the result can be used in URLs and file names without escaping — this is the alphabet JWT tokens use.

FAQ

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it instantly. Never use it to protect secrets; use real encryption such as AES instead.

Why does the output end with "=" signs?

Base64 turns every 3 input bytes into 4 output characters. When the input length is not divisible by 3, "=" padding fills the last block. The URL-safe mode omits the padding.

Why is the encoded output larger than my input?

Every 6 bits of input become one 8-bit output character, so Base64 data is about 33% larger than the original bytes.

More developer tools

Copied!