Skip to content

Base64 encode & decode

Encode text to Base64, decode it back, or turn a file into a ready-to-paste data URI — all in one tab, without anything leaving your browser. The text encoder is UTF-8 safe, so Hindi text and emoji round-trip correctly, unlike a plain btoa() call.

  • 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 or decodes as you type; File converts anything you drop into a Base64 data URI.

  2. Pick a direction

    On the Text tab, switch between Encode and Decode, and turn on URL-safe if the result needs to sit inside a URL.

  3. Copy the result

    Grab the raw Base64, the full data URI, or a ready-made <img> tag and CSS url() snippet for an image file.

Questions people ask

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.

What is Base64 used for?

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

Is Base64 encryption?

No. Base64 is encoding, not encryption — anyone can decode it with the same three lines of code this tool uses. Never rely on it to protect a secret.

Why does Hindi or emoji text break other Base64 tools?

The browser's built-in 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, CJK characters and emoji all encode and decode correctly.

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

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

Why does decoding fail with "invalid character"?

Usually missing = padding, or URL-safe characters (- and _) mixed into a string copied from a non-URL-safe source. This tool auto-fixes both before decoding, so a genuine failure means the text is not valid Base64 at all.

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.