All Tools

Base64 Encoder / Decoder

Encode or decode Base64 strings. Also encode files to Base64 data URLs.

✓ Runs entirely in your browser. ✓ Nothing uploaded.

About the Base64 Encoder / Decoder

Base64 is a way of representing binary data — like an image, a PDF or raw bytes — using only 64 plain text characters (A–Z, a–z, 0–9, + and /). Systems that were built to move text around safely, such as email, JSON APIs and HTML data URLs, can't always carry raw binary without it getting corrupted. Encoding to Base64 turns that binary into a text string that survives the trip, and decoding turns it back.

This tool encodes and decodes both plain text and whole files directly in your browser. Your input is never uploaded to a server — the conversion happens locally in JavaScript using the browser's own encoding functions, so even sensitive text stays on your machine.

How to use it

  1. 1Choose the Text tab to convert a string, or the File → Base64 tab to convert a file into a data URL.
  2. 2For text: paste or type your content into the input box.
  3. 3Click Encode to Base64 to convert plain text into a Base64 string, or Decode from Base64 to turn a Base64 string back into readable text.
  4. 4For files: select any image, PDF or document and the tool produces a Base64 data URL you can paste straight into HTML or CSS.
  5. 5Click Copy to put the result on your clipboard.

Common uses

  • Embedding a small image or icon directly inside HTML or CSS as a data URL, avoiding an extra network request.
  • Sending binary attachments through JSON APIs or webhooks that only accept text fields.
  • Storing a logo or signature inside a configuration file or database column.
  • Decoding a Base64 string from a JWT, an email header or an API response to read what it contains.
  • Quickly inspecting or debugging encoded values while developing.

Tips & good to know

  • Base64 is encoding, not encryption — anyone can decode it. Never use it to hide passwords or secrets. For that, use the File Encrypt tool instead.
  • Base64 makes data roughly 33% larger, so it's best for small assets. Large images are usually better served as real files.
  • If decoding fails, check that the whole string was copied — a single missing character breaks the result.

Frequently asked questions

Is my data uploaded anywhere?
No. Both text and file conversion run entirely in your browser using local JavaScript. Nothing is sent to a server.
Can I convert an image to Base64?
Yes. Use the File → Base64 tab, select the image, and you'll get a data URL you can paste directly into HTML or CSS.
Is Base64 secure for passwords?
No. Base64 is reversible by anyone and offers no security. Use real encryption for anything sensitive.