Base64 Encoder / Decoder

Updated June 2026

Convert text to Base64 and back again. Type or paste on the left and the result appears instantly on the right — UTF-8 and emoji safe, with a URL-safe option and one-click copy. Everything runs privately in your browser.

Base64 encodes any text or data into a safe ASCII string of letters, numbers, + and /. Paste text to encode it, or paste Base64 to decode it — all in your browser, nothing uploaded.

How Base64 encoding works

Base64 takes a stream of bytes and rewrites it using only 64 printable characters: A–Z, a–z, 0–9, plus + and /. It works by grouping the input three bytes (24 bits) at a time, then splitting those 24 bits into four groups of six bits. Each 6-bit group — a value from 0 to 63 — maps to one Base64 character. When the input length is not a multiple of three, one or two = characters are added as padding.

Because the output uses only safe ASCII, Base64 is everywhere data needs to ride through a text channel: embedding images in HTML or CSS, attaching files to email, encoding tokens in JSON, and putting binary values into URLs. The trade-off is size — Base64 is about 33% larger than the original data, since every three bytes become four characters.

Worked example: the text hello is five bytes. Encoding it produces aGVsbG8= — the single = shows that one padding step was needed to complete the final group. Decoding aGVsbG8= gives back hello exactly.

Text ↔ Base64 examples

TextBase64
helloaGVsbG8=
Hi!SGkh
larelybGFyZWx5
Base64QmFzZTY0
caféY2Fmw6k=

Reference note: this tool encodes text as UTF-8 first, so multi-byte characters such as é or emoji round-trip correctly. Remember that Base64 is encoding, not encryption — it hides nothing and protects nothing.

Frequently asked questions

What is Base64 encoding?
Base64 represents binary data or text as a string of 64 safe ASCII characters — A–Z, a–z, 0–9, plus + and /. It lets data travel safely through systems that expect plain text, such as email, URLs and JSON.
How do I decode a Base64 string?
Paste the Base64 into the tool and switch to Decode mode. It reverses the encoding and shows the original text. If the string is not valid Base64, you get a clear error instead of broken output.
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode it back with no key or password, so it provides no security. Use real encryption to protect sensitive data.
What is URL-safe Base64?
URL-safe Base64 swaps + and / for - and _ and usually drops the = padding, because those characters have special meaning in URLs. The result drops straight into a URL or filename.
Does Base64 handle emoji and non-English text?
Yes. This tool encodes text as UTF-8 before converting, so emoji, accented letters and non-Latin scripts are preserved and decode back to the original characters.
Is my data uploaded?
No. All encoding and decoding happens locally in your browser. Nothing you type or paste is sent to a server, so it is safe to use with private text.
⚡ Base64 Encoder / Decoder — by larely ↗

The rest of the workbench

Password Generator

Generate strong, random passwords and passphrases privately in your browser.

UUID Generator

Generate random version-4 UUIDs, one or in bulk, in your browser.

Text Diff Checker

Compare two texts and highlight the differences line by line.

Hash Generator

Generate SHA-256, SHA-1, SHA-384 and SHA-512 hashes in your browser.

JSON to CSV Converter

Convert a JSON array to CSV and CSV back to JSON.

Image to Base64 Converter

Encode an image to a Base64 data URI for HTML or CSS, in your browser.

Image Compressor & Converter

Compress, resize and convert JPEG, PNG and WebP images in your browser — nothing is upl…

File Checksum Calculator

Verify a file's SHA-256, SHA-1, MD5 or CRC32 checksum in your browser — no upload.

AES-256 Text Encryption

Encrypt and decrypt text with password-based AES-256-GCM, entirely client-side.

HMAC Generator & Verifier

Compute and verify HMAC-SHA256 and other HMAC signatures in your browser.

Test Data Generator

Generate fake mock data as CSV or JSON for testing.

More workbench tools →