✓ Copied to clipboard!
🔐 Free Online Tool

Encode & Decode
Base64 Instantly

The fastest, cleanest Base64 tool online. Encode text, decode strings, convert files — all in your browser.

Input Text
0 chars
Base64 Output
0 chars
Base64 Input
0 chars
Decoded Output
0 chars
Input: 0 bytes
Output: 0 bytes
Ratio:
Line length: 76
More Tools
🖼️

Image to Base64

Convert any image (PNG, JPG, GIF, SVG, WebP) into a Base64 encoded string for use in HTML or CSS.

📁

File to Base64

Convert any file into Base64 — perfect for embedding binaries, documents, or assets inline.

📄

PDF to Base64

Encode PDF files to Base64 for embedding in JSON, XML, email, or web API payloads.

🔢

Base32 Encode

Encode and decode text using the Base32 alphabet — useful for TOTP tokens and case-insensitive systems.

Base64 Encode Functions
🐘

PHP base64_encode()

See how to encode/decode Base64 in PHP using the built-in base64_encode() and base64_decode() functions.

🐍

Python base64.b64encode()

Python's base64 module provides b64encode() and b64decode() for Base64 operations.

🦪

JavaScript btoa()

Use the built-in btoa() and atob() functions in JavaScript to encode and decode Base64 strings.

Java encode()

Java's java.util.Base64 class provides static methods to encode and decode Base64 data.

🖼️ Image Tool

Image to Base64

Convert images to Base64 encoded strings for use in HTML img tags, CSS backgrounds, or data URIs.

🖼️

Drop image here or click to browse

Supports PNG, JPG, GIF, SVG, WebP, BMP — max 10MB

Preview
File Info
📁 File Tool

File to Base64

Encode any file — PDF, ZIP, DOCX, audio, video — to Base64. Runs entirely in your browser. No uploads to server.

📁

Drop any file here or click to browse

PDF, DOCX, ZIP, MP3, MP4, and more — max 50MB

🔢 Base32

Base32 Encode & Decode

Encode or decode text using the Base32 alphabet (RFC 4648). Commonly used in TOTP (2FA) tokens and DNS records.

Input Text
Output
🔑 Base32 uses 32 characters (A–Z and 2–7). Unlike Base64, it's case-insensitive and avoids visually similar characters — making it ideal for TOTP authenticator keys.
💻 Code Examples

Base64 in Every Language

Copy-paste ready Base64 encode and decode examples for 13 languages and platforms.