encoding

Base64 Encoder / Decoder

Encode and decode Base64 online—UTF-8, URL-safe, files, image paste, MIME wrap. 100% local.

Enter text to encode, use Upload file / Upload image, or drag a file into this area.

Base64 output

5L2g5aW977yMQmFzZTY0

Base64 Course

Learn Base64 encoding from first principles: binary-to-text, padding, URLs, and common pitfalls.

Course home

About this tool

DevCove Base64 Encoder / Decoder converts text and files to Base64 (and back) locally in your browser. It uses proper UTF-8 byte encoding—not legacy Latin-1 traps—and supports standard and URL-safe alphabets, optional MIME line breaks, binary downloads, and hex previews when decoded data is not valid UTF-8 text.

How to use this tool

Encode or decode Base64 in a few steps:

  1. Choose Encode and type UTF-8 text—including emoji and CJK characters—or upload / paste an image.
  2. Copy the Base64 output, or switch to Decode to reverse the process.
  3. Select URL-safe when working with JWT segments or query strings that forbid + and /.
  4. Enable MIME wrap when you need 76-character lines for email-style payloads.
  5. If decode shows binary instead of text, download the bytes—your input may be an image or compressed file.
  6. Open the Base64 course below to learn padding, alphabets, and common mistakes—not just button clicks.

Features

Built for APIs, JWTs, Data URIs, and everyday encoding work:

  • UTF-8 aware encode and decode using TextEncoder / TextDecoder (no Latin-1 corruption).
  • Standard RFC 4648 and URL-safe (-_) alphabets with optional padding removal.
  • File upload, drag-and-drop, and clipboard image paste → Base64 without a server.
  • MIME 76-column line wrapping for PEM-style payloads.
  • Hex byte preview and binary download when decoded data is not UTF-8 text.
  • Swap, copy, example, and clear actions in the toolbar.
  • Copy share link to save encode/decode state in the URL (?text= or ?b64=).
  • Batch mode for line-by-line encode/decode with per-row errors.
  • Data URI builder for data:image/png;base64,... and related formats.
  • 100% client-side—your text and files never leave the browser.
  • Linked Base64 subject course with six published lessons.
  • Bilingual interface with SEO-friendly documentation on this page.

FAQ

Is Base64 encryption?

No. Base64 is an encoding—it represents bytes as printable ASCII. Anyone can decode it. Do not treat Base64 as secrecy; use real cryptography when you need confidentiality.

Why does my Unicode text break with some online tools?

Legacy APIs like btoa() only handle Latin-1. DevCove encodes UTF-8 bytes first, so languages like Chinese and emoji round-trip correctly.

What is URL-safe Base64?

URL-safe variants replace + with - and / with _ so strings fit in URLs and JWT segments without extra escaping. Padding may be omitted in some specs.

Can I encode images?

Yes. Drag, drop, or paste an image—or upload any file up to 5 MB—and the tool encodes it locally. A thumbnail preview appears for images.

Why do I see binary instead of text after decode?

The Base64 likely represented non-text bytes (PNG, gzip, etc.). Use Download binary or the hex preview; do not force invalid UTF-8 into a text field.

Is my data uploaded?

No. All encoding and decoding runs in your browser. DevCove does not send your input to a server.