PixConvert

Base64 Encoder & Decoder

Encode text or files to Base64, or decode Base64 strings — instantly, in your browser, with zero data collection.

Why Use PixConvert Base64 Tool

The fastest Base64 converter on the web. Encode or decode in milliseconds with full privacy.

Text & File Support

Encode plain text, JSON payloads, or upload a file (image, PDF, binary) and convert it to Base64 data URI.

100% Private

All encoding/decoding happens client-side using native browser APIs. Nothing leaves your device.

Instant Results

Native btoa/atob runs at browser speed. No network round-trip, no delays, no timeouts.

Swap in One Click

Toggle between Encode and Decode modes and swap input/output instantly to reverse an operation.

URL-Safe Mode

Optionally strips padding and replaces + and / with - and _ to produce URL-safe Base64 for use in headers and query strings.

Shareable Links

The encoded value is persisted in the URL hash so you can share specific Base64 strings with teammates.

Common Base64 Use Cases

Base64 is everywhere in web development. Here's where you'll use this tool.

API Authentication

Encode credentials for HTTP Basic Auth headers or decode tokens from API responses.

  • Encode username:password pairs
  • Decode Authorization headers
  • Inspect JWT header and payload

Inline Assets

Convert images, fonts, or binary data to Base64 data URIs for embedding directly in HTML or CSS.

  • Embed small images as data: URIs
  • Inline fonts in CSS
  • Attach binary files to JSON payloads

Email & Data Transfer

SMTP encodes attachments as Base64. Decode email payloads or prepare binary data for MIME transfer.

  • Decode email attachment payloads
  • Prepare binary data for MIME encoding
  • Transfer binary through JSON APIs

How to Encode or Decode Base64

1

Choose Encode or Decode mode. Paste your text (or upload a file for encoding) into the input area.

2

Click Encode or Decode. The result appears immediately in the output. Click Copy to copy to clipboard.

3

Toggle URL-safe mode for tokens, JWTs, or query strings — output uses - and _ instead of + and /.

Frequently Asked Questions

Everything about Base64 encoding and decoding in the browser.

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's commonly used to encode binary data for transmission over text-based protocols like HTTP, SMTP, and JSON.

Is my data safe to encode here?

Yes. Encoding and decoding happens entirely in your browser using native JavaScript (btoa/atob). Nothing is sent to any server. The tool is safe for passwords, tokens, and private data — though note that Base64 is NOT encryption, it's just encoding.

What's the difference between standard and URL-safe Base64?

Standard Base64 uses + and / characters and = padding. URL-safe Base64 replaces + with - and / with _, and may strip = padding. URL-safe is required when embedding Base64 in URLs, HTTP headers, or filenames to avoid character interpretation issues.

Can I encode files, not just text?

Yes. Click 'Encode a file' to upload any file. The tool reads it as binary and outputs the Base64 data URI. This is useful for embedding small images in CSS (url(data:image/png;base64,...)) or attaching binary data to JSON APIs.

Why does my decoded output look garbled?

If you're decoding a binary file (image, PDF, zip), the decoded bytes are binary data — not human-readable text. Use the 'Download as file' option to save the decoded binary. For text, ensure the original encoding was UTF-8.