Free Developer Tool

Base64 Encoder & Decoder

Encode text or files to Base64, decode Base64 back to text or downloadable files, and preview Base64 image data URIs — all processed locally in your browser.

  • ✔ Text encode & decode
  • ✔ File to Base64
  • ✔ Base64 to file
  • ✔ Image preview
  • ✔ URL-safe variant
  • ✔ Free Forever
Plain Text Hello, World! api_key=abc123 Base64 SGVsbG8sIFdvcmxkI Q== YXBpX2tleT1hYmMx data:image/png;base64,iVBORw0K... Image preview supported

Encode and Decode Base64 in Seconds


Base64 is the standard encoding for transmitting binary data over text-only channels — used constantly in API authentication headers, JWT tokens, email attachments, CSS data URIs, and configuration files. This free tool handles all four common Base64 tasks: encoding and decoding text, converting any file to a Base64 string, decoding a Base64 string back to a downloadable file, and previewing Base64-encoded images directly.

How It Works

1. Choose a Tab

Text, file encoding, file decoding, or image preview.

2. Paste or Upload

Paste text or Base64, or drag and drop any file.

3. Encode or Decode

Click the button and see the result instantly.

4. Copy or Download

Copy to clipboard or download the result as a file.

Input
Output
Drop any file — image, PDF, ZIP, binary — to get its Base64-encoded string. Use the "Include data URI prefix" option to get a ready-to-use data:mime/type;base64,... string for CSS or HTML.

Click to upload or drag and drop any file

Any file type, up to ~10 MB recommended

Paste a Base64 string (with or without a data URI prefix) to decode it back to a downloadable file.
Paste a Base64-encoded image (with or without the data URI prefix) to preview it and get the correct <img> or CSS background-image snippet.
Base64 Basics

When Is Base64 Used?

API Authentication

HTTP Basic Auth credentials are Base64-encoded in the Authorization header on every request.

JWT Tokens

The header and payload sections of every JSON Web Token are Base64URL-encoded strings.

Data URIs

Inline images in CSS and HTML use Base64 data URIs to embed image bytes directly in the file.

Email Attachments

MIME email attachments are Base64-encoded so binary files can travel over text-based protocols.

FAQsBase64 Encoder & Decoder

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

Standard Base64 uses + and / characters, which are special characters in URLs. URL-safe Base64 replaces these with - and _ so the string can be used in URLs and HTTP headers without percent-encoding.

Why does Base64 make files larger?

Base64 encodes every 3 bytes of binary data as 4 ASCII characters, resulting in approximately 33% overhead compared to the original binary size.

Is my data uploaded anywhere?

No. All encoding and decoding happens entirely in your browser using JavaScript. Nothing is sent to any server.

24/7 Support Available:

Our support team is here to assist you around the clock. Get Expert Help, Anytime.