Base64 Encoder/Decoder

Transform text or files to Base64 and vice versa, with automatic verification.

Input

Or import a file to get its Base64

Drop a file here

Max size: 10 MB

Result


About: Base64 Encoder/Decoder

This Base64 encoder and decoder converts text to Base64 and back, and turns any file into a Data URL you can embed in HTML, CSS or JSON. In Auto mode it checks whether your input is already valid Base64 and decodes it, otherwise it encodes it. Use it to read an encoded token or API field, prepare a configuration value, or check what an image Data URL actually contains thanks to the built-in preview.

Features

  • Auto mode decodes valid Base64 and encodes anything else, so you never have to pick a direction.
  • Handles UTF-8 properly: accents, emoji and non-Latin scripts round-trip without getting mangled.
  • Import a file up to 10 MB to get its full Base64 Data URL, including the MIME type.
  • Shows a preview when you paste an image Data URL, and lets you download the underlying file.
  • Copy the result in one click or download it as a file.

How to use it

  1. Paste text, a Base64 string or a Data URL into the input field, or import a file.
  2. Leave the mode on Auto, or force Encode or Decode.
  3. Copy the result or download it.

Questions about usage

No. Encoding, decoding and file reading all happen in your browser with standard APIs (TextEncoder, atob, FileReader). Nothing is transmitted, so you can safely work with private tokens or files.

Drop the image into the import area below the text field. The tool produces its full Data URL, such as data:image/png;base64,…, along with a preview. Copy the code to use it in an img src attribute, a stylesheet or a JSON file.

The string contains characters outside the Base64 alphabet or has incorrect padding, or the decoded bytes are not valid UTF-8 text, as with a binary file. For files, paste a complete Data URL with its data: prefix instead.