Utilo

Base64 Encode / Decode

Free Base64 encode and decode for text and files. Supports UTF-8 and URL-safe Base64, entirely in your browser. No signup and nothing is uploaded.

What this Base64 tool does

Base64 represents binary data using 64 printable ASCII characters, so it can travel safely through systems built for text: JSON, email, HTML attributes, HTTP headers and environment variables. This tool encodes text to Base64 and decodes it back with full UTF-8 support, offers the URL-safe variant used in JWTs and web tokens, and can turn any file into a data: URL you can paste into CSS or HTML.

How to use it

  1. Choose Encode or Decode.
  2. Enter your text. Emoji and non-Latin scripts are encoded as UTF-8 bytes, so they round-trip correctly.
  3. Toggle URL-safe to replace + and / with - and _ and drop the = padding.
  4. Use Swap to feed the output back as input in the opposite direction.
  5. For files, click File → Data URL, choose a file and copy the resulting string.

Practical examples

  • HTTP Basic auth: encode user:password to build an Authorization: Basic dXNlcjpwYXNzd29yZA== header.
  • Inspecting a JWT: paste the middle segment of a token and decode it to read the JSON payload. The decoder handles missing padding automatically.
  • Inline icons: convert a small SVG or PNG to a data URL and use it directly in background-image: url(...) to save an HTTP request.
  • Kubernetes secrets: values in a Secret manifest must be Base64-encoded; encode them here without sending them to any server.

Tips and edge cases

  • Base64 is an encoding, not encryption. Anyone can decode it, so never treat it as a way to hide secrets.
  • Encoded data is about 33% larger than the original: every 3 bytes become 4 characters.
  • Data URLs larger than a few kilobytes usually hurt performance because they cannot be cached separately and block CSS parsing.
  • If decoding fails, check for line breaks inserted by email clients, or for URL-safe characters in a standard decoder. This tool accepts both alphabets.
  • Decoding binary files to text produces unreadable output; that is expected.

Frequently asked questions

Is Base64 secure?

No. It is a reversible representation with no key. Use it to transport data, and use real encryption such as AES or TLS to protect it.

Why does my Base64 end with = or ==?

Padding characters make the length a multiple of four. One = means the last group had two bytes, == means it had one byte. URL-safe Base64 often omits padding.

Why do emoji decode to strange characters in other tools?

Some tools use the browser's btoa, which only supports Latin-1. This tool converts text to UTF-8 bytes first, which is the standard behaviour in other languages.

What is the size limit?

Text encoding works with several megabytes. Data URLs above 200,000 characters are truncated in the preview, but Copy copies the full string.

Yes. All processing happens directly in your browser using JavaScript, Web Workers and Web APIs. Nothing you type, paste or upload is sent to our servers.