64
64Encode
100% Client-Side • Zero Server Uploads • 8 Specialized Encoders

Encode to Base64 Instantly

Type or paste any UTF-8 text, JSON, or select a local file to convert into standard Base64 or URL-safe Base64url right in your browser.

Switch to Decode
Plain Text Input (UTF-8) 0 B
Base64 Output 0 chars

Specialized Base64 Encoders

Dedicated tools for images, PDFs, binary files, hex bytes, Data URIs, and Basic Auth.

Need to Decode? Visit 64Decode.com
UTF-8 & Batch

Text to Base64 (UTF-8) Encoder

Encode plain UTF-8 text, emojis, JSON, or multi-line batches into standard or 76-char MIME-wrapped Base64.

Text & Data Open Tool
Data URI & CSS

Image to Base64 & CSS/HTML Generator

Drag and drop PNG, JPG, WEBP, GIF, or SVG images to generate raw Base64, Data URIs, <img> tags, and CSS backgrounds.

Media & Files Open Tool
PDF & Embed

PDF to Base64 & Embed Generator

Encode PDF documents into Base64 strings, data:application/pdf Data URIs, and ready-to-paste HTML <iframe> embed snippets.

Media & Files Open Tool
Any File Type

File to Base64 Binary Encoder

Encode any binary file (ZIP, audio, font, DOCX, executable) into raw Base64 or Data URI directly in browser memory.

Media & Files Open Tool
Hex Bytes

Hexadecimal to Base64 Converter

Convert hexadecimal byte strings (continuous, space-separated, colon-separated, or 0x-prefixed) into Base64 or Base64url.

Developer & Security Open Tool
RFC 4648 §5

URL-Safe Base64url Encoder

Encode text into RFC 4648 §5 URL-safe Base64url (- and _ instead of + and /) with optional trailing = padding removal.

Developer & Security Open Tool
RFC 2397

Data URI Generator (HTML / CSS / SVG / MIME)

Build valid data:<mime>;base64,... URIs from raw code (SVG, HTML, CSS, JS) or uploaded files with live preview.

Developer & Security Open Tool
HTTP Header

HTTP Basic Auth Base64 Header Generator

Generate Authorization: Basic <base64> headers from username and password plus ready-to-use curl and fetch() snippets.

Developer & Security Open Tool
Technical Guide

How to Encode Text, JSON & Binary Files to Base64 Online Safely

Base64 encoding converts binary data or UTF-8 text into a 64-character ASCII alphabet (A-Z, a-z, 0-9, +, /) so it can travel safely through JSON APIs, HTML/CSS files, email MIME bodies, and URL parameters. 64Encode processes everything 100% locally in your browser with zero server uploads.

UTF-8 Safe Base64 Encoding Without Emoji or Unicode Corruption

JavaScript’s built-in btoa() throws an error on Unicode characters like emojis or non-Latin scripts. 64Encode first converts your text into raw UTF-8 bytes via TextEncoder before Base64-encoding, guaranteeing lossless output across every language and symbol.

URL-Safe Base64url, No-Padding & 76-Character Line Wrapping

Customize your output for any specification: enable URL-Safe (- / _) for RFC 4648 §5 tokens and filenames, strip trailing = padding for JWT/OAuth payloads, or wrap lines at 76 characters for RFC 2045 MIME emails. Need to decode Base64 back to text or files? Visit 64Decode.com.

Frequently Asked Questions

Common Questions

How do I encode UTF-8 text or JSON to Base64 online?

Type or paste your text into the Plain Text Input box above. 64Encode encodes UTF-8 bytes to Base64 in real time so you can copy or download the result immediately.

Are my files or text uploaded to a server when encoding?

No. All encoding runs 100% locally in your browser using TextEncoder and FileReader APIs. Your data never leaves your device.

What does the URL-Safe (- / _) option do?

It replaces + with - and / with _ per RFC 4648 §5 so the Base64 string can be safely used in URLs, query parameters, and filenames.

When should I check No Padding (=) or Wrap 76 chars?

Use No Padding (=) for JWTs and URL query parameters. Use Wrap 76 chars when embedding Base64 inside MIME email headers or PEM blocks.

Can I encode multiple lines separately in one click?

Yes. Enable Line-by-Line mode to encode each line independently into its own Base64 string.

How do I decode a Base64 string back to text, image, or PDF?

Click Switch to Decode in the header or visit 64Decode.com to decode Base64 strings back into text, images, PDFs, or binary files.