Base64 Encoder Tool

Convert text or files to Base64 format. Generate Data URIs and decode Base64 strings.

Last updated: 2026/10/16 Developer Feedback & bug reports
Input

How to Use

1

Select Text or File

Enter text or drag & drop a file.

2

Encode or Decode

Click "Encode" to convert to Base64, or "Decode" to revert.

3

Copy Result

Copy to clipboard with the copy button.

About Base64

Base64 is an encoding scheme that represents binary data in text format. It is used for email attachments, Data URIs, and binary data transmission in APIs.

Features

  • Text & File SupportConvert not only text but also images and PDFs to Base64.
  • Data URI GenerationOutput images as Data URIs for direct embedding in HTML or CSS.
  • URL Safe OptionGenerate URL-safe Base64 by replacing + and / with - and _.
  • Privacy ProtectedAll processing happens in your browser. Files are never sent to servers.

Use Cases

  • Embed images directly in HTML (Data URI)
  • Send binary data via APIs
  • Encode email attachments
  • Decode JWT tokens for inspection
  • Embed images in CSS

Related Tools & Guides

Base64 shows up everywhere in web development. To turn images into Data URIs, try the Image to Base64 tool. For converting between hexadecimal and text, use the Hex Text Converter, and to handle URL parameters safely see the URL Encoder. If you want to understand how Base64 works and why it is used, read our guide 'What is Base64?'.

FAQ

Is the Base64 converter free?
Yes, it is completely free. No registration required.
What file size can it handle?
Within browser memory limits, usually up to several MBs.
Does Base64 increase file size?
Yes, Base64 encoded data is about 1.33 times larger than the original.
Are my files safe?
All processing happens locally in your browser. Files are never sent to our servers.
What is a Data URI?
A format starting with "data:" that allows embedding data directly in HTML or CSS.
What is URL-safe Base64?
URL-safe Base64 replaces the "+" and "/" characters with "-" and "_" and drops the trailing "=" padding so the string can be used safely inside URLs. Check "URL Safe" to output this format; when decoding, the tool automatically detects standard and URL-safe Base64.
Can it handle line breaks and emoji correctly?
Yes. The tool uses TextEncoder for full UTF-8 support, so Japanese text and emoji are converted safely. Enable "Insert line breaks (76)" to output MIME-style Base64 wrapped every 76 characters, and you can paste Base64 that contains line breaks or a full Data URI string to decode it directly.