TOOL · 02

Base64 Encode / Decode

Encode text or images to Base64, or decode them back. Full UTF-8 support — Chinese, emoji, everything.

Converter

Supports PNG, JPG, GIF, WebP and SVG. Recommended size: under 2 MB — Base64 output is about 33% larger than the original file.

Output

Result appears here…

About Base64

Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It shows up everywhere: email attachments, data URLs, JWT tokens, API keys. This tool supports full UTF-8.

Features

文A

Full UTF-8

Chinese, emoji, any language — encoded and decoded correctly, byte for byte.

Image support

Convert PNG, JPG, GIF, WebP and SVG files to Base64 data URIs and back.

100% private

Everything runs in your browser — your data never leaves the page.

Free forever

No registration, no limits, no watermarks. Just paste and go.

How to use

  1. 1

    Enter or paste

    Type text to encode, or paste a Base64 string to decode. In Image mode, pick or drop an image file.

  2. 2

    Click Encode or Decode

    Encode turns text into Base64; Decode turns Base64 back into readable text.

  3. 3

    Copy the result

    Grab the output with one click — for images, copy the data URI or the raw Base64.

Use cases

Data URIs

Embed images directly in CSS or HTML as data: URIs — no extra HTTP request.

Email & attachments

Understand and produce the Base64 payloads used by MIME email.

API tokens

Decode JWT segments, API keys and other Base64-encoded credentials.

Binary in text fields

Safely store binary data in JSON, XML or database text columns.

Example

Text
Hello, TmpIO!
Base64
SGVsbG8sIFRtcElPIQ==

Base64 output is about 33% larger than the input — every 3 bytes become 4 characters, with optional = padding at the end.

FAQ

Is my data uploaded to a server?

No. Encoding and decoding happen locally in your browser with plain JavaScript. Nothing is transmitted or stored.

Why is my decoded text garbled?

The source was probably not valid Base64, or it was encoded from binary rather than UTF-8 text. This tool assumes UTF-8 text.

What is the = padding at the end?

Base64 works in 4-character blocks. When the input length is not a multiple of 3, = characters pad the final block.