Base64 Encoder/Decoder

Encode and decode Base64 strings

Base64 Encoder/Decoder

Encode and decode Base64 strings

Characters: 0 | Bytes: 0
Characters: 0 | Size: 0 bytes

Quick Examples:

Features

  • Encode and decode Base64 strings
  • Support for URL-safe encoding
  • Real-time conversion as you type
  • Copy, paste, and download options

How to Use

  1. 1. Choose encode or decode mode
  2. 2. Enter or paste your text/Base64 string
  3. 3. Watch the conversion happen in real-time
  4. 4. Copy the result or download as a file

Base64 Encoder/Decoder FAQs

Can I encode files or images with this tool?

No, this converter handles typed or pasted text only. If you need to turn an image or any other file into a Base64 data URI, use the dedicated File to Base64 tool, which reads the file directly in your browser.

What does the URL-safe encoding option change?

It produces RFC 4648 URL-safe Base64: plus signs become hyphens, slashes become underscores, and the trailing equals-sign padding is removed, so the string can be dropped into URLs and query parameters without escaping. When decoding, the tool detects hyphens or underscores automatically and restores standard Base64 before converting.

When would I enable line breaks every 76 characters?

This wraps the output in the MIME style used by email attachments, PEM certificates, and other line-limited formats. It is ignored while URL-safe encoding is checked, since padded wrapped output is rarely what URL-safe consumers expect.

Why does decoding say my string is invalid?

The "Invalid Base64 string" message appears when the input contains characters outside the Base64 alphabet or its length cannot form complete byte groups. Whitespace and line breaks are stripped automatically before decoding, so wrapped certificate blocks paste in cleanly as long as the Base64 itself is intact.

Is my text transmitted anywhere during conversion?

No. Encoding and decoding run in JavaScript on this page as you type, and both textareas live only in your browser session. Nothing is logged, cached, or sent to a server.