Base64 Encoder/Decoder

Or encode a file (up to 5 MB) such as an image:

Your data is processed in your browser and never uploaded or stored.

How to use the Base64 encoder and decoder

To encode, type or paste your text into the Input box and click Encode to Base64. To decode, paste Base64 text and click Decode from Base64. You can also choose a file, such as an image, to turn it into a Base64 string. Use Copy Output to copy the result, or “Use output as input” to keep converting.

What is Base64?

Base64 is a way of writing data using only 64 safe text characters: letters, numbers, plus and slash. It lets binary data such as images, or text with special characters, travel safely through systems that only handle plain text, like email, JSON and web addresses.

Important: Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.

Common uses of Base64

  • Embedding small images directly in HTML or CSS as data URIs.
  • Sending files and attachments in email and APIs.
  • Storing binary data inside JSON or XML.
  • Reading the contents of tokens and credentials used in web apps.

What do the options do?

  • URL-safe Base64: swaps the plus and slash characters for a dash and underscore and removes the trailing equals signs, so the result can be used safely in links. Decoding accepts both standard and URL-safe Base64 automatically.
  • Wrap lines at 76 characters: splits long output into lines, as required by the MIME email format.
Scroll to Top