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
- Pick the data type: Text, Local file or Remote URL.
- For text, optionally choose the character encoding (UTF-8 is the default and what most systems expect).
- Choose the Base64 standard and output format.
- 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
- Text to Base64
- File to Base64
- Image to Base64
- PNG to Base64
- JPG to Base64
- GIF to Base64
- BMP to Base64
- ICO to Base64
- SVG to Base64
- WebP to Base64
- AVIF to Base64
- Audio to Base64
- MP3 to Base64
- WAV to Base64
- Ogg to Base64
- FLAC to Base64
- WMA to Base64
- Video to Base64
- PDF to Base64
- Hex to Base64
- HTML to Base64
- CSS to Base64
- JSON to Base64
- URL to Base64
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.
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!