Base64 Encode/Decode

Encode text or files to Base64, decode Base64 back. Supports URL-safe variant and Data URI.

Browser Processing Only (Offline Ready)
1

Enter your text

Paste or type your content into the input field.

2

Adjust settings

Configure options to get the result you want.

3

Copy or save

Copy the output to clipboard or save it.

Key Features

Real-Time Conversion

Encode or decode instantly as you type. No button clicks needed — results update live with every keystroke.

Text & File Support

Encode any file (images, PDFs, ZIPs) to Base64, or paste Base64 to decode and download the original file.

URL-Safe Base64 (RFC 4648)

One-click switch to URL-safe variant that replaces +/ with -_ and omits padding. Perfect for JWT tokens and URL parameters.

Data URI Output

Generate ready-to-use data:{mime};base64,... strings for embedding images, fonts, or files directly in HTML, CSS, or JS.

Image Preview & Auto-Detect

Automatically detects decoded images (PNG, JPEG, GIF, WebP) and shows an inline preview. Smart detection switches to decode mode when Base64 input is detected.

Swap, Stats & Privacy

One-click output-to-input swap, real-time byte size display, and 100% browser-side processing — your data never leaves your device.

About This Tool

What is Base64 Encoder/Decoder?

Base64 Encoder/Decoder converts text and files to Base64 encoding and back. Base64 is a binary-to-text encoding scheme commonly used to embed data in URLs, emails, HTML, and JSON where binary data isn't supported.

Encode text or any file (images, PDFs, ZIPs) to Base64, or decode Base64 strings back to text or downloadable files — all in your browser, with URL-safe variant and Data URI support.

Common Use Cases

  • Data URIs: Encode images or fonts as Base64 data URIs for embedding in HTML/CSS without external file requests
  • JWT Tokens: Decode JWT payloads using URL-safe Base64 for debugging and inspection
  • API Authentication: Encode credentials for HTTP Basic Authentication headers
  • File Transfer: Convert binary files to Base64 text for inclusion in JSON APIs, emails, or configuration files
  • Email Attachments: Encode/decode MIME attachments in email protocols
  • Developer Debugging: Quickly inspect Base64-encoded data in logs, tokens, or API responses

Privacy-First Base64 Processing

All encoding and decoding happens directly in your browser. Your files and text are processed locally and never uploaded to any server.

  • Ideal for encoding sensitive credentials, tokens, and private files
  • No server-side processing, no logging, no data collection
  • Works completely offline after initial page load
  • Install as a PWA for instant access without internet

FAQ

Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters. It's commonly used in data URLs, email attachments, and API payloads.
Yes. Switch to the File tab to encode any file (images, PDFs, ZIPs, etc.) to Base64. You can also decode a Base64 string back to a downloadable file.
No. All processing happens entirely in your browser. Your data never leaves your device — nothing is uploaded to any server.
Yes. Once the page has loaded, the tool works completely offline. For the best experience, install PrivaDeck as a PWA from your browser.
There are no server-imposed limits. The maximum file size depends on your device's available memory and browser capabilities. Most modern devices handle files up to several hundred MB without issues.
URL-safe Base64 (RFC 4648 section 5) replaces + with - and / with _, and omits padding =. It's commonly used in JWT tokens, URL parameters, and filenames.