Skip to content
Accessibility
Theme
Text size
High contrast
Limit animations
Readable fontAtkinson Hyperlegible
Increased text spacing
Underline links
Always show focus

Runs in your browser — nothing you paste is uploaded.

Base64 Encode & Decode

Convert text, images and files to Base64 (or a data URI) and back. Full UTF-8, a URL-safe variant, and image preview. Runs entirely in your browser — nothing is uploaded.

Or drop a file / image here to encode · or click to choose


      

What it does

Base64 represents binary or text data using 64 ASCII characters, so it can travel safely through systems that only handle text — data URIs, email, JSON, HTTP headers. This tool encodes and decodes text, and also images and other files, all client-side.

Images & files

In Encode, drop a file or image (or click to choose) to get its Base64 — tick data URI for a ready-to-paste data:image/png;base64,… string for CSS or <img src>. In Decode, paste Base64 or a data URI of an image and it's previewed and can be saved. Everything stays in your browser.

UTF-8 safe

Naive Base64 (btoa) breaks on non-Latin-1 characters. Text is encoded as UTF-8 bytes first, so café, 日本語, and 😀 round-trip correctly.

URL-safe variant

Tick URL-safe for the -/_ alphabet without = padding — the form used in JWTs and query strings. Decoding accepts either variant automatically.

Privacy

Encoding and decoding happen in your browser; nothing is uploaded. Working with a JWT? Its parts are URL-safe Base64 — decode them here, or use the JWT decoder.

Frequently asked questions

Is Base64 a form of encryption?

No. It's an encoding, not encryption — anyone can decode it. Use it for transport and embedding, never to protect secrets.

Why does my decoded output look garbled?

The input probably isn't UTF-8 text — it may be binary or another charset, or not valid Base64. For images use the decoder's preview; binary data won't read as text.

Related tools