All tools · Utilities

Base64

Encode or decode Base64 text.

Free to use, no sign-up required. Base64 is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Encodes text or files as Base64 and decodes Base64 back again, including data URIs for embedding images in HTML, CSS or JSON.

How to use Base64

  1. Choose encode or decode.
  2. To encode, type text or use Encode a file for an image, PDF, video or any other file.
  3. Copy the result with Copy Base64 or Copy data URI.
  4. To decode, paste Base64 or a data: URI; text is shown as text, images, video and PDFs are previewed, and Download saves the file.

How it works

Text is converted to UTF-8 bytes before encoding, so accented letters and emoji work. Decoding accepts raw Base64 or a data URI and ignores spaces and line breaks. When there is no data URI prefix, the file type is detected from its first bytes: PNG, JPEG, GIF, WebP, PDF, MP4 and WebM are recognised. URL-safe Base64 using - and _ is not accepted.

Example

Hello, world! encodes to SGVsbG8sIHdvcmxkIQ==, and café encodes to Y2Fmw6k= because é takes two bytes in UTF-8.

Questions about Base64

Is Base64 encryption?

No. It is an encoding anyone can reverse, used to carry binary data through systems that only accept text. Never use it to hide passwords or secrets.

Why is the Base64 bigger than the file?

Every 3 bytes become 4 characters, so encoded data is about 33% larger. The = signs at the end are padding to complete the last group.

What it takes

Use it from chat

You do not have to open Base64 to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools