Base64 Encoder / Decoder

Encode text or files to Base64 and decode Base64 strings instantly. 100% private — runs entirely in your browser.

About This Tool

Encode and decode Base64 without a server

Base64 is everywhere — data URLs in CSS, file attachments in emails, binary payloads in REST APIs. This tool lets you encode any text or file to Base64 and decode any Base64 string back to readable text, all inside your browser.

Need to encode URLs too? Try the URL Encoder/Decoder. Working with JSON? Use the JSON Formatter.

Encode & Decode

Switch between encode and decode modes instantly with one click.

📁

File to Base64

Upload any file and get its Base64 string — images, PDFs, or any binary.

Download Decoded

Decode a Base64 string and download it as a binary file.

🔒

100% Private

No server involved — btoa() and atob() run locally in your browser.

Quick Start

How to Use

01

Choose Mode

Select Encode to turn text into Base64, or Decode to convert Base64 back to plain text.

02

Paste or Upload

Type text directly, paste a Base64 string, or click 'File to Base64' to encode any file.

03

Copy or Download

Copy the result to clipboard or download the decoded binary file directly.

FAQ

Frequently Asked Questions

What is Base64 encoding?

Base64 converts binary data into a text string using 64 printable ASCII characters. Commonly used to embed images, files, or binary data inside JSON, HTML, CSS, or email payloads.

Does this upload my data anywhere?

No. Everything runs locally in your browser using JavaScript's built-in btoa() and atob() functions. Your data never leaves your device.

Why is Base64 output longer than the input?

Base64 expands data by ~33% because it represents every 3 bytes as 4 ASCII characters.

What is Base64 used for?

Embedding images in CSS/HTML (data URLs), encoding email attachments (MIME), passing binary data in JSON APIs, and storing small files in databases.

Related Tools