Pages

Topics

Tools

↑↓navigate↵openescclose
Encoding & Security

Base64 Encode / Decode

Convert UTF-8 text or a local file to Base64 and back, with URL-safe output, a data URI option, an image preview and a file download.

Runs entirely in your browser — nothing you paste is uploaded.

Base64 reference

quick reference
A-Z a-z 0-9 + /
The 64 characters of the standard alphabet; output length is padded with = to a multiple of four.
- _
URL-safe Base64 swaps + and / so the value can sit in a path segment or query string without escaping.
33%
Base64 grows data by about a third, which is why large payloads should be sent as binary instead.
btoa / atob
Browser helpers that only accept Latin-1 bytes, so encode text as UTF-8 first.
data:image/png;base64,
An inline data URL; fine for tiny icons, wasteful for photos and cacheable assets.
encoding, not encryption
Anyone can decode Base64. Protecting a value needs encryption or signing.

Frequently asked questions

answered below the tool
Why does non-Latin text decode to garbage?

btoa and atob only handle Latin-1. This tool encodes the text as UTF-8 first, so Korean, Japanese and emoji survive the round trip.

When do I need URL-safe Base64?

In a query string or path segment, where + and / would be re-encoded; URL-safe replaces them with - and _.

Is Base64 encryption?

No. Anyone can decode it. Use it for transport encoding, never to protect a password or a key.

All Python guides