Home/Base64 Encode / Decode
Encoding

Base64 Encode / Decode

General Base64 codec for text and Data URIs (UTF-8)

Input
Plain text
Output
Base64

Overview: Base64 Encode / Decode is a bidirectional tool with UTF-8 and Base64URL support. Base64 is the classic way of encoding binary data as an ASCII string and is used everywhere: email transport, URL parameters, embedded Data-URI images, JWT tokens, encrypted key storage and more. This tool handles multi-byte characters (Chinese, emoji, etc.) correctly and supports both the standard variant and the URL-safe variant (-/_).

How to use: Step 1 — type the plain text you want to encode on the left, or click Sample to load an example. Step 2 — the Base64 result appears on the right in real time; encoded length is roughly 4/3 of the source UTF-8 bytes. Step 3 — to go the other way, paste the Base64 string on the right; the tool decodes it and even accepts the URL-safe variant without padding. Step 4 — buttons in the top-right let you swap the panels and copy the result in one click.

Typical scenarios: Embed binary assets (images, PDFs) into HTML/CSS as Data URIs from the back-end; use Base64 in the Authorization: Basic header for username/password on the front-end; work with JWT header and payload (Base64URL encoded); store ciphertext as a string inside JSON or a database; lightly obfuscate short strings for non-sensitive hints (note: Base64 is encoding, not encryption).

Technical notes: The tool uses UTF-8 as the character base: it converts the input to bytes first, then Base64. Standard Base64 uses the 64 characters A-Z a-z 0-9 + / plus = as padding; the URL-safe variant replaces + with -, / with _, and usually skips padding. The decoder handles both and pads automatically. Illegal characters produce a clear error message. Remember that Base64 is only an encoding, not a security measure.

Privacy: All encoding and decoding happens locally in your browser, so sensitive strings such as passwords, tokens or private keys are never uploaded, making it safe for ad-hoc conversion of internal credentials.

Frequently Asked Questions

How do I use Base64 Encode / Decode?
Step 2 — the Base64 result appears on the right in real time; encoded length is roughly 4/3 of the source UTF-8 bytes. Step 3 — to go the other way, paste the Base64 string on the right; the tool decodes it and even accepts the URL-safe variant without padding.
What can Base64 Encode / Decode do?
Typical scenarios: Embed binary assets (images, PDFs) into HTML/CSS as Data URIs from the back-end; use Base64 in the Authorization: Basic header for username/password on the front-end; work with JWT header and payload (Base64URL…
Is my data private when I use Base64 Encode / Decode?
Privacy: All encoding and decoding happens locally in your browser, so sensitive strings such as passwords, tokens or private keys are never uploaded, making it safe for ad-hoc conversion of internal credentials. Privacy: All encoding and decoding happens locally in your browser, so sensitive strings such as…
What technical details should I know about Base64 Encode / Decode?
Standard Base64 uses the 64 characters A-Z a-z 0-9 + / plus = as padding; the URL-safe variant replaces + with - , / with _ , and usually skips padding. The decoder handles both and pads automatically.