Base64 Encode & Decode
Encode text or files to Base64, or decode Base64 back to text. Everything runs in your browser — your data never leaves your device.
Supports UTF-8 text, binary files, and Data URI generation. Use Encode to convert text to Base64, Decode to convert Base64 back to readable text, or Open File to encode any file.
InputHow It Works
This Base64 tool processes your data entirely in your browser — no data is sent to any server. Enter text or open a file, click Encode or Decode, and see the result instantly.
Encoding
Encoding converts your text or file into a Base64 string — a text representation of binary data using only letters (A-Z, a-z), digits (0-9), plus (+) and slash (/). This is useful for embedding binary data in JSON, XML, HTML, CSS, email, and URLs.
Decoding
Decoding converts a Base64 string back to its original text. Paste any Base64-encoded string and click Decode to see the original content. The tool handles standard Base64 and URL-safe Base64 variants.
File Encoding
Click "Open File" to encode any file (images, PDFs, fonts, etc.) to Base64. The result includes a Data URI prefix (e.g., data:image/png;base64,...) that you can use directly in HTML img tags or CSS background properties.
Privacy First
All processing runs locally in your browser using JavaScript. Your data never leaves your device — there are no server requests, no cookies, and no tracking.
Frequently Asked Questions (FAQ)
Q: What is Base64 encoding?
A: Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It is commonly used to embed images in HTML/CSS, send binary data in JSON/XML, encode email attachments, and store binary data in text-based formats.
Q: Is my data stored on the server?
A: No. All encoding and decoding happens directly in your browser using JavaScript. Your data is never sent to any server. Everything stays completely private on your device.
Q: Does it support UTF-8 characters?
A: Yes. The encoder properly handles UTF-8 characters including Cyrillic, Chinese, Arabic, emoji and all Unicode text.
Q: Can I encode files to Base64?
A: Yes. Click the Open File button to select any file from your device. The file will be read and encoded to Base64 directly in your browser. This is useful for embedding images, fonts, or other assets in CSS and HTML.
Q: What is a Data URI?
A: A Data URI is a Base64-encoded string prefixed with a MIME type, like data:image/png;base64,... It allows you to embed files directly in HTML or CSS without a separate HTTP request.
Q: How much larger is Base64 than the original?
A: Base64 encoding increases the data size by approximately 33%. For example, a 3 KB file becomes about 4 KB when Base64 encoded. This is because Base64 uses 4 characters to represent every 3 bytes of data.
Q: Is there a size limit?
A: Since everything runs in your browser, there is no server limit. Text encoding works instantly for any size. File encoding depends on your browser's memory, but files up to 10-20 MB work fine in most browsers.
Q: Is this tool free?
A: Yes, completely free with no registration required. Use it as many times as you need.