Base64 Encode Online

The most flexible Base64 encoder: encode plain text, any local file or a remote URL. You can pick the character set used for text, the Base64 standard (standard, MIME, URL-safe, PEM, IMAP and more) and the output format. Enable live mode to encode as you type.

How to use the Base64 Encode Online tool

  1. Pick the data type: Text, Local file or Remote URL.
  2. For text, optionally choose the character encoding (UTF-8 is the default and what most systems expect).
  3. Choose the Base64 standard and output format.
  4. Press Encode to Base64 and copy or download the result.

Supported Base64 standards

  • Standard (RFC 4648): alphabet A–Z a–z 0–9 + / with = padding.
  • MIME (RFC 2045): same alphabet, lines wrapped at 76 characters with CRLF.
  • PEM (RFC 7468): lines wrapped at 64 characters, as used in certificates.
  • Base64URL (RFC 4648 §5): - and _ instead of + and /, no padding. Used in JWT and URLs.
  • IMAP (RFC 3501): + and ,, no padding.
  • XML name token (. and -) and XML identifier (_ and :).
  • OpenPGP ASCII armor (RFC 4880): 76-char lines plus a CRC-24 checksum.

Why does the character set matter?

Base64 encodes bytes, not letters. The same word produces different bytes in UTF-8, Windows-1252 or Shift_JIS, and therefore a different Base64 string. Use UTF-8 unless the receiving system explicitly expects a legacy encoding.

When developers encode to Base64

Use this free Base64 encoder to embed images in CSS/HTML data URIs, put binary blobs in JSON APIs, build HTTP Basic Auth headers, wrap PEM certificates, or produce URL-safe tokens. Prefer Base64URL for JWTs and query strings, and MIME wrapping when a mail client expects 76-character lines.

All Base64 encoders

All Base64 decoders

Frequently asked questions

How do I Base64 encode a string?

Choose "Text", paste your string, and click "Encode to Base64". The default UTF-8 setting matches what JavaScript, Python, PHP and Java produce.

Can I Base64 encode a file?

Yes. Choose "Local file" and pick any file: images, PDFs, ZIPs, certificates and so on. The file is processed locally and never uploaded.

What is the difference between Base64 and Base64URL?

Base64URL replaces "+" with "-" and "/" with "_" and usually omits padding, so the result can be used in URLs and file names without escaping.

Is this Base64 encoder free?

Yes. Encode unlimited text and files in your browser with no sign-up. Nothing you encode is uploaded to our servers.

How do I encode for e-mail (MIME)?

Select the MIME (RFC 2045) standard so the output is wrapped at 76 characters with CRLF, which is what many mail systems expect.

Related tools and guides

Comments (0)

Questions, ideas or a bug in “Base64 Encode Online”? Leave a comment, rate the tool, or reply to others.

No comments yet. Be the first to share your feedback!

Leave a comment

Rate this tool:
Esc
↑ ↓ move↵ openEsc close