Skip to content
LineOtter

Base64 encoder and decoder

Encode text for an API or config file, decode a Base64 string you found in a token or log, or turn a small image into a data: URI. Nothing is uploaded.

Runs in your browser. Nothing is uploaded.

Loading tool…

How to use

  1. Choose Text → Base64, Base64 → text or File → Base64.
  2. Paste text or add a file.
  3. Copy or download the result.

Common uses

  • Decode a Base64 string in an API response, email header or configuration file to see what it contains.
  • Encode credentials or text for an HTTP header or a config value that requires Base64.
  • Embed a small icon directly in HTML or CSS as a data: URI.

Example

Input
héllo ✓
Result
aMOpbGxvIOKckw==

Good to know

  • Accents and emoji: encoded as UTF-8, so they decode back correctly.
  • URL-safe: uses - and _ instead of + and /, with no = at the end.
  • Decoding: accepts both styles, with or without =, line breaks or a data: prefix.
  • Not text: if the result is an image or other file, you get a message instead of garbled characters.
  • Size: files up to 10 MB. Base64 is about a third larger than the file.
  • Not secret: Base64 is not encryption; anyone can decode it.
  • Data URIs: File → Base64 can add the data: prefix so the result works directly in an img tag or CSS.
  • Files are processed by your browser and never uploaded. Closing or resetting the page discards them.

Questions

Should I embed images as Base64?

Only small ones, such as icons. Base64 adds about 33% to the size and cannot be cached separately. Compress the image first to keep the data: URI short.

Can I decode a Base64 image back to a file?

Not yet. Decoding produces text only; binary data shows a message instead of garbled output.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / so it can sit in URLs and file names, often without = padding. Tokens such as JWTs use it.