Lihat halaman ini dalam Bahasa IndonesiaVer esta página en españolVer esta página em portuguêsDiese Seite auf Deutsch ansehen

Base64 Encoder & Decoder

Convert text and files to Base64 and back. Text is encoded as UTF-8, so accents and emoji survive the round trip. Choose Base64URL for tokens and URLs, wrap lines for MIME, or turn a file into a data URI for HTML and CSS.

Runs 100% in your browser: keys and data are never uploaded
Loading the tool…

How to use this tool

  1. Choose Encode or Decode.
  2. To encode, type text or pick a file; to decode, paste the Base64 (standard, URL-safe or a data URI).
  3. Set the options: Base64URL, 76-character lines, or a data URI for files.
  4. Copy the result, or download the decoded bytes as a file.

What this tool can do

UTF-8 text

Text is encoded and decoded as UTF-8, so non-English characters and emoji come back exactly as they went in.

Base64URL

The URL-safe alphabet without padding, as used in JWTs and URL parameters. Decoding accepts both alphabets, with or without padding.

Files and data URIs

Encode images, fonts or any file to Base64 or to a data: URI, and decode Base64 back into a downloadable file.

Binary data

Decoded bytes that are not text are shown as hex instead of broken characters, and can be downloaded as they are.

Tips and common problems

"Not valid Base64"

Base64 only contains A-Z, a-z, 0-9, + and / (or - and _), plus = padding. Remove surrounding quotes, and check that nothing was cut off when the value was copied.

The decoded text looks garbled

The data is probably binary (an image, compressed data or a key), not text. Switch to hex or download it as a file.

Base64 is not encryption

Anyone can decode it. To protect a value, encrypt it, for example with the AES tool.

Frequently asked questions

Is my data uploaded?

No. Encoding and decoding run in your browser, including files.

Why is the Base64 bigger than the original?

Base64 writes every 3 bytes as 4 characters, so the result is about 33% larger, plus line breaks if you wrap it.

What is a data URI?

A string such as data:image/png;base64,... that embeds a small file directly in HTML, CSS or JSON instead of linking to it.

Can I decode a JWT with this?

You can decode each part, but the JWT Decoder is easier: it splits the token, formats the JSON and checks the signature.