Advertisement728 × 90 — Leaderboard
Advertisement320 × 50 — Mobile banner

Base64 Encode / Decode

Encode and decode Base64 — with URL-safe, MIME, and per-line options
Also need:URL Encoder / DecoderJWT DecoderJSON Formatter
Input
Ctrl
Advertisement300 × 250
Advertisement728 × 90

About Base64 Encode / Decode

Encode any text to Base64, or decode Base64 back to plain text — all in your browser. Supports standard Base64, URL-safe Base64 (RFC 4648 Base64URL) for use in URLs and JWTs, MIME line splitting (76 chars/line per RFC 2045) for email attachments, and per-line encoding for batch processing. Your data never leaves your device.

Frequently Asked Questions

What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters. It is used to safely embed binary content — images, files, or encrypted data — inside text-only formats like JSON, XML, email (MIME), and CSS data URIs.
What is the difference between Base64 encoding and encryption?
Base64 is encoding, not encryption. It converts binary data to printable ASCII text so it can be transmitted in contexts that only handle text (email headers, JSON, URLs). It provides zero security — anyone can decode it instantly. Encryption uses a key to make data unreadable without that key. Never use Base64 to protect sensitive data.
What is the difference between standard Base64 and URL-safe Base64?
Standard Base64 uses + and / characters. URL-safe Base64 replaces + with - and / with _ to avoid conflicts with URL path separators and query string delimiters. Use URL-safe encoding for Base64 data in URLs, JWT tokens, and filenames. Both produce the same padding (=) at the end; some URL contexts also strip padding.
Can I encode and decode images or binary files with Base64?
Yes. Upload a file or paste binary data and the tool encodes it to Base64. The encoded string is suitable for data URIs in HTML/CSS (data:image/png;base64,...) or for embedding binary attachments in JSON payloads. Decoding reverses the process and produces the original binary content.
Does Base64 encoding increase file size?
Yes — Base64 expands data by approximately 33%. Every 3 bytes of input become 4 characters of output. A 1 MB image becomes roughly 1.37 MB as Base64. This is a deliberate trade-off: the increase in size is acceptable for the ability to embed binary content in text-based protocols.
Advertisement300 × 250
Advertisement300 × 250
Ad
AdvertisementSticky banner
Ad
AdvertisementSticky banner