Base64 Encoder

Encode text, files and images to Base64 instantly. Supports multiple charsets, URL-safe format, and image preview.

Home/Tools/Base64 Encoder
Loading…

What is Base64 Encoding?

Base64 encoding converts binary data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). Every 3 bytes of input are represented as 4 Base64 characters, making the output roughly 33% larger. It is widely used to embed images in CSS or HTML, transmit binary data in JSON APIs, and encode email attachments.

How to Use This Tool

  1. Select a mode: Text, File, or Image
  2. Paste or upload your content in the Input area
  3. The Base64 encoded output appears in the Output area instantly
  4. Copy or download the result from the Output area
  5. For non-ASCII text, open Advanced and set the correct Charset (e.g. GBK for Simplified Chinese)

Features

  • Text Encoding — encode any text string to Base64
  • File Upload — convert any text file to Base64 and download the result
  • Image Upload & Preview — upload an image and see a live preview with resolution, type, and file size
  • Charset Support — encode with UTF-8, GBK, Shift_JIS, and more
  • URL-Safe Base64 — output RFC 4648 §5 format suitable for URLs and filenames
  • 100% Browser-Based — your data never leaves your device

FAQ

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable characters. Every 3 bytes of binary data are encoded as 4 Base64 characters, so the output is roughly 33% larger than the original.

How do I encode text to Base64?

Paste your text into the Input field in Text mode. The encoded Base64 result appears in the Output field instantly.

How do I convert an image to Base64?

Switch to Image mode and drop your image file or click Choose Image. The tool generates the Base64 string and shows a live preview.

What is Base64URL?

Base64URL is a URL-safe variant that replaces + with - and / with _, and omits padding (=). It is safe to use in URLs, JWT tokens, and filenames.