---
title: Base64 Encoder & Decoder Online for Text, Files & Images
url: https://varstatt.com/toolkit/base64
description: Free Base64 encoder and decoder for text, files, and images. Convert images to data URIs. Preview decoded images. All client-side.
section: Developer Toolkit (https://varstatt.com/toolkit)
tags: encoding
related: Base64 (https://varstatt.com/toolkit/base64), Image to B64 (https://varstatt.com/toolkit/img2b64), Encrypt (https://varstatt.com/toolkit/encrypt)
---
# Base64 Encoder/Decoder

Free Base64 encoder and decoder for text, files, and images. Convert images to data URIs. Preview decoded images. All client-side.

## How It Works

1. **Choose text or file mode** — Use the Text tab for string encoding, or the File tab for binary files and images.
2. **Encode or decode** — Conversion happens live as you type. For files, drop or select a file to encode.
3. **Copy or download** — Copy the Base64 output. For decoded files, download the result or view image previews.

## FAQ

### What is Base64?

Base64 encodes binary data as ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It's used to embed data in text formats like JSON, HTML, and email.

### Why is Base64 output larger?

Base64 encoding increases size by ~33% because it represents 3 bytes of data using 4 ASCII characters. For encoding images specifically, use the dedicated [Image to Base64 tool](https://varstatt.com/toolkit/img2b64) which outputs ready-to-use data URIs.

### Does it handle Unicode?

Yes. Text is encoded via TextEncoder (UTF-8) before Base64 encoding, so all Unicode characters are supported.

## Usage

This tool runs entirely in the browser — visit the URL above to use it.

Prefill inputs via URL parameters:

- `https://varstatt.com/toolkit/base64?input=...`

## Related Tools

- [Base64](https://varstatt.com/toolkit/base64)
- [Image to B64](https://varstatt.com/toolkit/img2b64)
- [Encrypt](https://varstatt.com/toolkit/encrypt)
