Base64 Encoder/Decoder

Encode and decode Base64 strings and files

Processing runs in your browser. Your data stays on your device.

Free Base64 Encoder and Decoder

Encode and decode Base64 strings and files in your browser. Use it for data URIs, API payloads, and quick file conversions.

Features

  • Encode text to Base64
  • Decode Base64 to text
  • Encode files and images to Base64
  • Decode Base64 to downloadable files
  • URL-safe encoding option
  • Image preview for encoded or decoded images
  • Copy to clipboard
  • Runs entirely in your browser

What is Base64?

Base64 turns binary data into ASCII text. It is common for images, files, and other binary payloads that need to travel over text protocols like HTTP and email.

Common use cases

  • Embed images in HTML or CSS with data URIs
  • Encode files for API transmission
  • Inspect authentication tokens
  • Prepare MIME email attachments
  • Debug JWT payloads

How to Use Base64 Encoder/Decoder

  1. 1Choose between 'Text' or 'File' mode depending on what you want to encode/decode
  2. 2Select 'Encode' to convert to Base64, or 'Decode' to convert from Base64
  3. 3For text: paste your content in the input area
  4. 4For files: click or drag to upload your file
  5. 5Toggle 'URL-safe encoding' if you need Base64 for URLs
  6. 6Click the action button to process, then copy or download the result

Base64 Examples

Simple Text Encoding

Hello World → SGVsbG8gV29ybGQ=

Basic text encoding to Base64 format

URL-Safe Encoding

Uses - and _ instead of + and / for URL compatibility

Ideal for query parameters and URL paths

Data URI for Images

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...

Embed images directly in HTML/CSS

Frequently Asked Questions

What is Base64 encoding?

Base64 turns binary data into ASCII text. Developers use it when a protocol only accepts text, such as email MIME parts, HTTP bodies, or data URIs.

Is Base64 encoding secure?

No. Base64 is encoding, not encryption. Anyone can decode it, so do not treat it as a way to hide sensitive data.

Can I encode images to Base64?

Yes. Upload an image and convert it to a Base64 string. That is useful for embedding images in HTML or CSS as data URIs.

What is URL-safe Base64?

URL-safe Base64 swaps + and / for - and _, and drops = padding, so the string works in URLs and filenames without extra escaping.

Is my data safe when using this tool?

Yes. Encoding and decoding run in your browser with JavaScript. Files and text are not uploaded to a server.