Base64 Encoder / Decoder

Updated July 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 ↗

Related tools

Lorem Ipsum Generator

Generate placeholder text by paragraphs, sentences or words.

URL Slug Generator

Turn any title into a clean, SEO-friendly URL slug.

CSS Gradient Generator

Design a linear or radial CSS gradient and copy the code.

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.

CSS Box Shadow Generator

Visually design a CSS box-shadow and copy the code.

HTML Entity Encoder / Decoder

Escape and unescape HTML special characters and entities.

Text to Speech Reader

Read any text aloud with your browser's built-in voices.

Regex Tester

Test and debug regular expressions live, with match highlighting and groups.

Cron Expression Generator

Build, explain and preview cron schedules with their next run times.

Aspect Ratio Calculator

Resize dimensions proportionally and simplify resolutions to a ratio.

Markdown Preview

Live Markdown-to-HTML preview with copyable HTML output.

Browse all 251 free tools →