Free Base64 Encoder / Decoder
Encode any text string or file to Base64 and decode Base64 strings back to readable text. Convert images and files to Base64 data URIs for embedding in HTML, CSS, or JSON. URL-safe Base64 mode included. All processing happens entirely in your browser — your data never leaves your device.
🔢
Text & files
Encode any text string or file (images, documents, any format) to Base64.
🔗
URL-safe mode
Replaces + and / with - and _ for safe use in URLs and filenames.
🔒
100% private
All encoding and decoding happens in your browser — nothing is uploaded.
Frequently Asked Questions
What is Base64 encoding?+
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is used to safely transmit binary data (images, files) through text-based protocols like HTTP headers, email (MIME), and JSON.
Why does Base64 make data larger?+
Base64 encodes 3 bytes of binary data into 4 ASCII characters, making the output approximately 33% larger than the original. This size increase is the trade-off for making binary data safe to include in text formats.
What is URL-safe Base64?+
Standard Base64 uses + and / which have special meanings in URLs. URL-safe Base64 replaces + with - and / with _, making the encoded string safe to use in URLs and filenames without percent-encoding.
What is a Base64 data URI?+
A data URI is a way to embed file content directly in HTML or CSS. Format: data:[mediatype];base64,[encoded-data]. For example, you can embed a small PNG image directly in an <img> src attribute without a separate file.
Is Base64 a form of encryption?+
No. Base64 is encoding, not encryption. Anyone can instantly decode a Base64 string — it provides no security. Do not use Base64 to "hide" passwords or sensitive data.
You might also like
When is Base64 Used?
Base64 is used anywhere binary data needs to travel through a text-only channel. The most common cases are: embedding images directly in HTML or CSS as data URIs (avoiding extra HTTP requests for small icons), encoding binary data in JSON API payloads, transmitting file attachments in email (MIME), storing binary data in databases that only support text, and encoding credentials in HTTP Basic Authentication headers.
Base64 vs URL Encoding
Base64 and URL encoding (percent-encoding) both convert binary data to ASCII text, but for different purposes. Base64 is used for binary data transmission in general. URL encoding specifically escapes characters that are unsafe in URLs (spaces become %20, etc.). URL-safe Base64 bridges both worlds: it encodes binary data in Base64 format while replacing characters that would need percent-encoding in a URL (+ → -, / → _).