Boneyard Tools

Base64 Encode

Type or paste text and it is encoded to standard Base64 as you go, with a live character count above the output. Encoding runs through a UTF-8 encoder first, so accents, emoji and CJK characters survive the round trip instead of turning into garbled bytes. Flip on URL-safe mode when the result has to sit inside a URL, filename or JWT segment.

How to encode text to Base64

  1. Type or paste text into the Text input box, or click Load sample to drop in an example string.
  2. Leave URL-safe off for standard Base64, or tick 'URL-safe (base64url, no padding)' for a URL, filename or JWT.
  3. Watch the Base64 output update instantly, with the character count shown just above it.
  4. Click Copy to copy the result, or Download to save it as encoded.txt.

Examples

Encode a simple string

hello
aGVsbG8=

Accented text stays intact (UTF-8)

cafΓ©
Y2Fmw6k=

URL-safe output drops padding and swaps symbols

>>>?
Pj4-Pw

Frequently asked questions

What is Base64?

Base64 represents binary or text data using 64 printable ASCII characters plus padding. It is used to embed data in JSON, data URLs, email attachments and HTML, anywhere raw bytes could be mangled in transit.

Is Base64 encryption?

No. Base64 is reversible encoding, not encryption. Anyone can decode it straight back to the original text in seconds, so never rely on it to protect passwords, tokens or secrets.

What does the URL-safe option do?

URL-safe mode produces base64url: it replaces the plus sign with a hyphen and the slash with an underscore, then strips the trailing equals-sign padding. That makes the string safe to drop into URLs, filenames and JWT segments without escaping.

Does it handle emoji and accented characters?

Yes. Text is run through a UTF-8 encoder before Base64, so emoji, accents and other multi-byte characters encode correctly. For example cafe with an accented e becomes Y2Fmw6k=, which decodes back to the exact original.

Why is the output longer than my input?

Base64 turns every 3 bytes into 4 characters, so the encoded text is about one third larger than the source, plus a little padding. The character count above the output shows the exact length.

What is the equals sign at the end?

Standard Base64 pads the final group with one or two equals signs so the length is always a multiple of 4. URL-safe mode removes that padding, which is why a URL-safe result can look shorter.

Can I encode a file or image?

This tool encodes text you type or paste, not uploaded binary files. If you paste the text contents of a file it will encode fine, but picking a binary file such as a PNG is out of scope here.

How do I decode it back?

Run the result through a Base64 decoder to recover the original text. The default output here is standard Base64 that any decoder accepts; for URL-safe output use a decoder that understands base64url.

Is my text private?

Yes. Encoding happens entirely in your browser using the built-in encoder, so nothing you type is uploaded to a server and the tool keeps working offline.

Learn more

Related tools