Skip to content

Base64 encode

Turn text or a file into Base64 — the one-directional encode half of our Base64 tool, on its own page for the common case of only needing to produce Base64 output, whether that is a UTF-8-safe text string or an image turned into a ready-to-paste data URI.

  • Nothing you type leaves this page
  • Works offline once loaded
  • Free forever, no signup

How to use this tool

  1. Choose Text or File

    Text encodes as you type; File converts anything you drop into a Base64 data URI.

  2. Toggle URL-safe if needed

    Swaps + and / for - and _ and strips padding, for Base64 that has to sit inside a URL.

  3. Copy the result

    Raw Base64, the full data URI, or a ready-made <img> tag and CSS url() snippet for images.

Questions people ask

What is Base64 encoding used for?

Turning binary data into plain text so it can travel through systems built to only handle text safely — embedding a small image directly in CSS or HTML, email attachments, and the header and payload of a JWT are all Base64 underneath.

Why does encoding Hindi text or emoji break some other Base64 tools?

The browser's native btoa() function only understands one byte per character and throws on anything outside Latin-1. This tool converts text to UTF-8 bytes first, so Devanagari script and emoji encode correctly rather than erroring out.

How do I put a Base64-encoded image straight into HTML or CSS?

Drop the image on the File tab — you get the raw Base64, the full data:image/…;base64,… URI, and copy buttons for a ready-made <img src="…"> tag and a CSS background-image: url(…) line.

Does Base64 make a file bigger?

Yes, by roughly 33% — fine for a small icon embedded in CSS, wasteful for anything large, since three bytes of binary data always become four Base64 characters.

Is anything I paste here sent to a server?

No. The whole tool is JavaScript running in your browser, and this site has no endpoint that accepts text. That matters when what you are pasting is a real API payload, a customer record, or a password.

Bookmark this page — the tool keeps working offline, and your settings stay in this browser. Built by Dynamb Technologies, who make software for a living.