Advanced base64 all file & text encoder and decoder

The Advanced Base64 Encoder and Decoder handles both text strings and files directly in the browser. Encode a plain text value to Base64, decode a Base64 string back to readable text, or upload any file — image, PDF, archive, certificate — and get the Base64 output instantly. All processing happens locally in your browser. Nothing is sent to a server.

The File tab supports drag and drop, shows file name, size, and MIME type after encoding, and lets you decode Base64 back to a downloadable file. Enable the Data URI prefix option to produce output ready for use directly in HTML or CSS.

Drag & drop a file here, or

Any file type · max 5 MB

Decode file from Base64

How to use

Encode text

  1. Select the Text tab.
  2. Paste or type the text you want to encode in the Input field.
  3. Click Encode.
  4. Copy the result from the Output field using the copy button.

Decode text

  1. Select the Text tab.
  2. Paste the Base64 string in the Input field.
  3. Click Decode.
  4. The original text appears in the Output field.

Encode a file

  1. Select the File tab.
  2. Drag and drop a file onto the drop zone, or click Browse file to select one. Maximum file size is 5 MB.
  3. The file is encoded immediately. File name, size, and MIME type are shown below the drop zone.
  4. To include the Data URI prefix (for use in HTML or CSS), enable the Include Data URI prefix checkbox before copying.
  5. Copy the Base64 output using the copy button.

Decode Base64 back to a file

  1. Select the File tab and scroll to the Decode file from Base64 section.
  2. Paste the Base64 string into the input field. If the string starts with data:, the file type is detected automatically and the download starts immediately.
  3. If the string is plain Base64 without a Data URI prefix, enter the file extension in the extension field (for example: png, pdf, zip). Leave blank to download as .bin.
  4. Click Download file.

Frequently asked questions

Frequently asked questions

No. All encoding and decoding happens entirely in your browser using JavaScript. No data is transmitted to any server. This applies to both text and file inputs.

Practical examples

Embed a small icon in CSS without an extra HTTP request

Upload the icon PNG on the File tab, enable the Data URI prefix, copy the output, and paste it directly into your CSS:

.icon-check {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...");
  width: 16px;
  height: 16px;
}

Encode a secret value for a Kubernetes manifest

Kubernetes stores secret values as Base64 in YAML. Use the Text tab to encode the raw value, then paste the output into your manifest:

apiVersion: v1
kind: Secret
metadata:
  name: db-credentials
type: Opaque
data:
  password: cGFzc3dvcmQxMjM=
Common mistake: Base64 encoding is not encryption. Anyone with access to the Kubernetes secret object can decode the value instantly. Use proper RBAC controls and consider an external secrets manager for sensitive production credentials.

Decode a Base64 certificate received from a vendor

Vendors sometimes deliver certificates or configuration files as a Base64 string. Paste the string into the Decode section on the File tab, enter cer or pfx as the extension, and click Download. The file is ready to import into your certificate store.

Check what a Kubernetes secret contains

Retrieve the Base64 value from a Kubernetes secret and paste it into the Text tab to decode it:

kubectl get secret db-credentials -o jsonpath='{.data.password}'

Paste the output into the Input field on the Text tab and click Decode to read the original value.

Useful links

Other tools

Related articles