Detected: plain text → encode
File to Base64
Drag & drop an image or PDF to get a Base64 data URI
PNG, JPG, GIF, WebP, PDF supported
Input: 26 bytes → Output: 36 bytes (38% larger)
This tool is part of these guided projects. Each project provides step-by-step instructions with checklists and all the tools you need in one place.
Tools you might need next
Decode Base64 to text. Supports Unicode. For APIs and data decoding. Free developer utility that runs locally in your browser — fast, private, and no server
Encode text for URLs. Percent encoding. For query strings and links. Free developer utility that runs locally in your browser — fast, private, and no server
Decode JWT tokens. View header and payload. For debugging authentication. Free developer utility that runs locally in your browser — fast, private, and no
Input bytes are grouped into 24-bit chunks, split into four 6-bit values, and mapped to ASCII characters A–Z, a–z, 0–9, +, and /. Padding with = completes partial groups.
Output length ≈ ⌈(input bytes × 4) ÷ 3⌉Text is first encoded to UTF-8 bytes before Base64 conversion, ensuring emoji, CJK characters, and accented letters encode correctly — not limited to ASCII input.
Standard Base64 uses + and / which require URL encoding in query strings. URL-safe variants replace + with - and / with _, and often omit padding — common in JWTs and web tokens.
Updated: July 2026
Encode client_id:client_secret credentials for HTTP Basic Authentication.
→ bXljbGllbnQ6bXlzZWNyZXQ=
Encode a small SVG icon as a Base64 data URL for embedding in HTML or CSS.
→ data:image/svg+xml;base64,...
A developer Base64-encodes a small JSON filter object to pass safely in a URL query string.
→ eyJzdGF0dXMiOiJhY3RpdmUiLCJsaW1pdCI6MTB9
Base64 is encoding, not encryption. Anyone can decode it instantly. Never use Base64 alone to protect passwords, API keys, or sensitive data.
Double-encoding inflates size and breaks decoding. Encode raw text or binary once. If the input looks like random letters ending in =, decode first before re-encoding.
Convert plain text to Base64 encoding for APIs, data URLs, and safe transport of binary data over text-only channels. Supports Unicode characters and runs entirely in your browser for privacy.