Base64 Encoder/Decoder

Processed locally

Encode and decode Base64 strings and files. Processing runs in your browser. Your data stays on your device.

Text to Encode

Output

Your result appears here

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=

The text Hello World encoded as Base64

URL-Safe Encoding

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

Works in query parameters and URL paths

Data URI for Images

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

Put an image in HTML or CSS without a separate file

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?

Base64 is encoding, not encryption. Anyone can decode it, so do not use it to hide sensitive data.

Can I encode images to Base64?

Upload an image and convert it to a Base64 string. Data URIs use this form to embed an image in HTML or CSS.

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?

Encoding and decoding run in your browser with JavaScript. The tool does not upload files or text.