Free & private
Text & web

Base64 encode and decode

Convert any text — including full source files — to Base64 and back. It runs entirely in your browser, handles Unicode through UTF-8, and supports the URL-safe alphabet.

Reversible100% FreeNo upload
Base64
Text & web · reversible · UTF-8
try
Input0 chars · 0 bytes
Output0 chars · 0 bytes
UTF-8 · ready⌘⏎ copy⌘⇧S swap● local

What Base64 is

Base64 is a way to represent arbitrary binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, + and /, with = for padding. It exists because many systems — email headers, JSON, URLs, HTML attributes, HTTP tokens — were designed for text and will corrupt raw bytes such as null, newline or high-bit characters. Base64 trades size for safety: every three bytes become four characters, so the output is about 33% larger than the input, but it survives any text-only channel untouched.

How to use this tool

  1. Paste or type your text in the left panel, or load a file with Open.
  2. Encode turns it into Base64; Decode reads Base64 back into text.
  3. The result updates as you type. Use Copy or Save to take it with you.

Two options cover the common variants. URL-safe swaps + and / for - and _ and drops the = padding, which is what JWTs and query strings use. Line wrap inserts a newline every 64 or 76 characters, the convention for MIME email and PEM certificates.

Unicode and binary safety

Plenty of Base64 boxes break on anything outside plain ASCII. This one encodes text as UTF-8 first, so accented letters, non-Latin scripts and emoji round-trip exactly. Decoding reverses the same path, so what you put in is what you get back — byte for byte.

Where you will meet Base64

  • Data URIs — small images or fonts embedded directly in CSS or HTML as data:image/png;base64,….
  • HTTP Basic auth — the Authorization header carries base64(user:password) (note: this is encoding, not encryption).
  • JSON Web Tokens — each part of a JWT is URL-safe Base64.
  • Email attachments — MIME wraps binary parts in line-wrapped Base64.

Encoding is not encryption

Base64 is completely reversible by anyone — there is no key and no secret. It hides nothing. Use it to move data safely through text channels, never to protect it. For confidentiality you need real encryption.

Examples

InputHello, World!
OutputSGVsbG8sIFdvcmxkIQ==
Inputuser:pa55word
OutputdXNlcjpwYTU1d29yZA==

Frequently asked questions

Is Base64 encryption?
No. Base64 is a reversible encoding with no key. Anyone can decode it instantly, so it provides no security — it only makes binary data safe to transport as text.
Why is my Base64 longer than the original?
Base64 represents every 3 bytes with 4 characters, so the output is roughly 33% larger. Line wrapping adds a few more characters for the newlines.
What is URL-safe Base64?
A variant that replaces + and / with - and _ and removes = padding, so the string can sit in a URL or filename without being percent-encoded. JWTs use it.
Does this work with emoji and non-English text?
Yes. Text is encoded as UTF-8 before Base64, so any Unicode character round-trips exactly.
Is my data uploaded anywhere?
No. The conversion happens in your browser with JavaScript. Nothing is sent to a server, logged or stored.

Related tools

Every tool on encoder.website converts your text and hands the result straight back — it is never stored. Pick another tool from the sidebar any time.