Base64 Encoder

Encode text or files to Base64 with full UTF-8 support and an optional URL-safe format.

Decode instead

Runs in your browser — your data never leaves your device.

About the Base64 Encoder

Base64 turns any data into plain text made of letters, digits, + and /. It is used to embed images in HTML or CSS (data URIs), send attachments in email, store binary data in JSON and pass values in URLs or HTTP headers.

This encoder handles Unicode correctly, so text in Urdu, Arabic or with emojis encodes without errors. You can also encode whole files.

How to use the Base64 Encoder

  1. Type or paste text — the Base64 output updates instantly.
  2. Or click Encode a file to encode any file up to 15 MB.
  3. Tick URL-safe for use in URLs and file names, or 76-character lines for email (MIME).
  4. Copy or Download the result.

How it works

Text is first converted to bytes using UTF-8. Every 3 bytes (24 bits) are split into four 6-bit groups, and each group is mapped to one of 64 characters (A–Z, a–z, 0–9, +, /). If the input length is not a multiple of 3, = padding is added. Base64 output is always about 33% larger than the input.

URL-safe Base64 replaces + with - and / with _ and removes padding.

Examples

  • Hello World! → SGVsbG8gV29ybGQh
  • WE Tools → V0UgVG9vbHM=

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect passwords or secrets.

How do I make a data URI for an image?

Encode the image file, then put data:image/png;base64, (with the correct image type) in front of the output. The tool shows the right prefix after encoding a file.

Are my files uploaded?

No. Files are read and encoded locally in your browser.

Category: Developer Tools · Free to use · Last updated Oct 8, 2026