Base64 Encoder & Decoder – Free Online Tool
Encode text or files to Base64, decode Base64 strings back to plain text — all client-side with support for URL-safe variants and data: URLs.
What Is the Base64 Encoder / Decoder?
The Base64 Encoder & Decoder is a free, browser-based tool that converts text and binary files to Base64 — and back again — without uploading anything to a server. Use it to embed images directly in HTML or CSS as data URIs, encode binary payloads for JSON and XML APIs, or decode Base64 strings from configuration files and JWTs. URL-safe mode replaces + and / with - and _ for safe use in URLs and filenames.
Encode plain text or binary files (images, PDFs) to Base64 in seconds.
Decode any Base64 string back to readable text or a downloadable binary file.
Switch to URL-safe Base64 for tokens, JWTs, and filenames that must travel through URLs.
All encoding & decoding runs in your browser. Your data never touches a server.
How to Use
Choose Encode or Decode
Select the Encode tab to convert text or a file to Base64, or the Decode tab to reverse a Base64 string back to its original form.
Enter Your Input
Paste your text or Base64 string into the input area, or drag and drop a file onto the File tab to encode binary data like images or PDFs.
Select Options
Toggle URL-safe mode to replace +/ with -_, or enable line-wrapping at 76 characters for MIME-compliant output.
Copy or Download
Click Copy to grab the output text, or Download to save a decoded binary file directly to your device.
Frequently Asked Questions
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 commonly used to embed binary data in text contexts such as email, HTML data URIs and JSON payloads.
URL-safe Base64 replaces + with - and / with _ so the encoded string can be safely used in URLs and filenames without percent-encoding. The padding = characters are often omitted too.
No. Base64 is an encoding scheme, not encryption. It provides no confidentiality — anyone can decode a Base64 string instantly. Do not use Base64 to protect sensitive data.
Base64 encodes 3 bytes as 4 characters. If the input is not a multiple of 3 bytes, padding characters (=) are added to make the output length a multiple of 4. One = means one padding byte was needed; == means two.
Use a data URI: <img src="data:image/png;base64,YOUR_BASE64_HERE">. Switch on the 'Include data: URL prefix' option in the File tab and this tool will generate the complete data URI for you automatically.
Yes. Base64 encoding increases the size of binary data by approximately 33%, because every 3 bytes of input become 4 ASCII characters. This is the trade-off for making binary data safe to transmit as text.
Explore More Tools
Everything you need — PDF tools, design utilities, web helpers and developer tools — all free, all in your browser.