Skip to content
Rotina Diária

Encode and decode Base64

Convert text or files to and from Base64.

Processed on your device. Nothing you type is sent anywhere.

How to use: Encode and decode Base64

  1. Choose Encode or Decode.
  2. Paste your text or click Encode a file.
  3. When encoding, select URL-safe Base64 if you’re using the result in a link, JWT, or filename.
  4. Copy the result, or click Download decoded file if the decoded content is a file.

About this tool

How Base64 works

Base64 represents binary data using just 64 text-safe characters (A–Z, a–z, 0–9, +, and /). Every 3 bytes become 4 characters, so the result is about 33% larger than the original. If the total number of bytes isn’t divisible by 3, the result ends with = or == padding.

TextBase64
HiT2k=
OláT2zDoQ==
RotinaUm90aW5h

Where Base64 is used

  • Embedded images in HTML/CSS, such as data:image/png;base64,… — when you encode a file here, the result already uses this format. For images, you can also use our image to Base64 tool.
  • Email attachments (MIME) and PEM-format certificates.
  • APIs that accept PDFs or photos inside JSON.
  • JWT tokens, which use the URL-safe variant without padding — to read one, use our JWT decoder.

The URL-safe variant (RFC 4648, Section 5) replaces + with - and / with _, characters that don’t need to be encoded in links.

Base64 doesn’t protect your data

Anyone can decode Base64 in seconds, with no key. Don’t use it to “hide” passwords or personal information—you need real encryption for that. If the decoded content isn’t text (for example, an image, PDF, or ZIP file), the tool will let you know it’s binary and offer a download. When you download it, rename the file with the correct extension (.pdf, .png…).

Frequently asked questions

Why am I seeing “Invalid Base64”?

Usually, the code was cut off when copied or includes characters that aren’t part of Base64, such as quotation marks, commas, or an ellipsis from truncated text. Spaces, line breaks, the data:...;base64, prefix, and the URL-safe variant (- and _) are handled automatically when decoding.

Does it support accented characters?

Yes. Text is converted to UTF-8 bytes before encoding, so "ação" becomes YcOnw6Nv and decodes back to exactly the same text.

Is it really free? Is there a daily limit?

It's free with no daily limits. Processing happens on your device, so there's no per-use cost and no need to limit you.

Does it work on phones?

Yes. The site works in any modern browser on Android, iPhone, Windows, Mac, and Linux—no installation needed.