// encode text or files to base64 · decode base64 strings · url-safe mode · nothing leaves your browser
URL-safe
waiting for input
plain text
base64
↑
Click to select a file, or drag and drop
any file type · processed locally
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters. It's widely used to transmit data over systems that only support text — like embedding images in HTML/CSS, encoding credentials in HTTP headers, or storing binary data in JSON.
The name "Base64" comes from the 64 characters used in the encoding: A–Z, a–z, 0–9, +, and /.
How to use this tool
Select Encode tab to convert text → Base64
Select Decode tab to convert Base64 → text
Select File tab to encode any file to Base64
Enable URL-safe mode to replace + with - and / with _
Use ⇄ Swap to flip input and output instantly
Frequently Asked Questions
Is Base64 a form of encryption?+
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string without a key. It's meant for safe data transport, not security. Never use Base64 to hide sensitive data.
What is URL-safe Base64?+
Standard Base64 uses + and / which have special meanings in URLs. URL-safe Base64 replaces + with - and / with _, making the output safe to include in URLs and filenames without additional encoding.
Why does Base64 output end with == or =?+
Base64 encodes data in 3-byte chunks. If the input isn't divisible by 3, padding characters (=) are added to make the output a multiple of 4 characters. One = means 1 byte of padding was added; == means 2 bytes.
How much larger is Base64 output compared to the input?+
Base64 output is approximately 33% larger than the input. Every 3 bytes of input produce 4 bytes of Base64 output. This overhead is the trade-off for making binary data text-safe.
Can I encode images or binary files?+
Yes — use the File tab. Select any file (image, PDF, binary) and this tool encodes it to Base64 entirely in your browser. The output can be used as a data URI: data:image/png;base64,...