DockittDockitt

Base64 Encoder & Decoder Online — Text and Files

Encode and decode Base64 online. Supports plain text and file encoding. Free, browser-based.

Runs entirely in your browser — no data leaves your device
No account, no signup, completely free
Instant results — no waiting for server processing
Works offline once the page is loaded
Runs entirely in your browser. Your data never leaves your device — no server, complete privacy.

Base64 is an encoding scheme that converts binary data (or text) to a string of ASCII characters using only 64 characters (A-Z, a-z, 0-9, +, /). It is widely used to embed images in CSS or HTML data URLs, encode email attachments, store binary data in JSON, and transmit data over text-only channels. This tool encodes or decodes both plain text and files, entirely in your browser.

How to use

  1. Select the 'Text' tab to encode or decode text, or the 'File' tab to encode a file.
  2. For text: paste your content and click 'Encode' or 'Decode'. For files: drop a file and click 'Encode to Base64'.
  3. Copy the result to clipboard or download the output as a .txt file.

FAQ

What is Base64 encoding used for?

Base64 encoding is used whenever binary data needs to travel through a medium designed for text. Common use cases include: embedding images directly in HTML or CSS as data URLs (data:image/png;base64,...), encoding binary attachments in email (MIME), storing binary data in JSON (which only supports strings), embedding fonts in CSS, encoding API authentication tokens (HTTP Basic Auth sends username:password as Base64), and encoding binary data for storage in databases that only support text.

Does Base64 compress data?

No. Base64 increases the size of data by approximately 33%. Every 3 bytes of binary data are encoded as 4 Base64 characters. So a 100KB binary file becomes approximately 133KB when Base64 encoded. Base64 is an encoding, not a compression. If you need to reduce size, compress the data first (e.g., create a ZIP), then Base64 encode the compressed result.

What is the difference between standard Base64 and URL-safe Base64?

Standard Base64 uses + and / as the 62nd and 63rd characters, and = for padding. URL-safe Base64 (also called Base64url) replaces + with - and / with _ so the encoded string can be safely used in URLs and filenames without percent-encoding. This tool uses standard Base64. If you need URL-safe Base64, replace + with - and / with _ in the output, and remove any trailing = padding characters.

What is the maximum file size for encoding?

Files up to 10MB can be encoded. Because Base64 increases the output size by 33%, a 10MB file produces approximately 13.3MB of Base64 text. Larger files would produce Base64 strings that are difficult to work with in a textarea. For very large files, consider using the command-line: base64 filename on Linux/Mac, or certutil -encode filename on Windows.

How do I decode a Base64-encoded file back to its original format?

If you have a Base64 string that represents a file (such as a data URL for an image), switch to the 'File' tab and use the decode functionality. If the Base64 string starts with data:image/png;base64, or similar, the tool strips the data URL prefix and decodes the raw Base64. The resulting file downloads with the detected extension. For text mode, the decoded result is shown in the output textarea.

Is my data uploaded to a server?

No. All encoding and decoding runs in your browser using the browser's native btoa() and atob() functions, and the FileReader API for files. No data is sent to any server, which is important when encoding confidential files or credentials.