Base64 Encoder & Decoder
Encode text or files to Base64, or decode Base64 back to text. Supports URL-safe mode and auto-detection.
Quick Answer
Base64 encoding converts binary data into a 64-character ASCII alphabet (A-Z, a-z, 0-9, +, /), making it safe for text-based protocols like email and URLs. Encoding increases data size by approximately 33% (3 bytes become 4 characters). URL-safe Base64 replaces + with - and / with _ to avoid conflicts with URL parameters.
File to Base64
Drag & drop a file here, or click to browse
About This Tool
The Base64 Encoder & Decoder is a free online tool that converts text and files to and from Base64 encoding in real time. Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters, making it safe to transmit through text-based protocols like email, JSON, and URLs.
In Encode mode, type or paste any text and the tool instantly produces the Base64 representation. In Decode mode, paste a Base64 string and get the original text back. Toggle URL-safe mode to use the RFC 4648 variant that replaces + with - and / with _, which is commonly used in JWTs, URL parameters, and file names.
The file upload feature lets you drag and drop any file to encode it as Base64. This is useful for embedding small images as data URIs in HTML or CSS, encoding binary attachments for JSON APIs, or converting files for text-based storage. The tool shows both the original file size and the encoded size so you can evaluate the overhead.
Auto-detection analyzes your input: if you paste something that looks like Base64 while in Encode mode, the tool offers to switch to Decode mode automatically. All processing happens in your browser — no data is sent to any server.