Base64 Encoder & Decoder

Encode and decode Base64 text and images. Supports URL-safe Base64. Preview images inline. 100% client-side.

Free Always No Account Needed 100% Client-Side

About this tool

Base64 is an encoding scheme that converts binary data into ASCII text using 64 printable characters (A-Z, a-z, 0-9, +, /). It's essential for embedding binary data in text formats.

Common uses: - Embedding images in HTML/CSS as data URLs (data:image/png;base64,...) - Encoding binary data in JSON API payloads - HTTP Basic Authentication (credentials = base64("user:pass")) - Storing binary data in databases that only support text - Email attachments (MIME encoding)

This tool supports:

Text Encode/Decode — convert any text to and from Base64 with UTF-8 support.

URL-safe Base64 — replaces + with - and / with _ for safe use in URLs and filenames.

Image to Base64 — upload an image and get its Base64 data URL for direct embedding in HTML/CSS.

Base64 to Image — paste a Base64 string and preview the image directly.

Frequently Asked Questions

Does Base64 encrypt my data?
No. Base64 is encoding, not encryption. Anyone can decode it instantly. Never use Base64 for security — use proper encryption.
Why does Base64 end with '=='?
Base64 encodes 3 bytes at a time. If the input isn't divisible by 3, padding characters (=) are added to complete the last group.
What is URL-safe Base64?
Standard Base64 uses + and / which are special characters in URLs. URL-safe Base64 replaces them with - and _ respectively.
How big is a Base64-encoded image?
Base64 encoding increases file size by approximately 33%. A 100KB image becomes ~133KB when Base64-encoded.

Related Tools