Pro Every tool, icon and stickerAll of Pro for $5.99/month

  • All 85 tools
  • Festival Post Maker
  • Icon & sticker pack ZIPs
Go Pro
HubToolify
Text Tools

Base64 Encoder & Decoder Pro

Convert text to Base64 and back, turn a file into a data URI, and read the contents of a JWT or data URI. Unicode text is handled correctly, including accents and emoji. Free preview · Pro required to export. Encode and decode up to 3,000 characters, or encode a file up to 256 KB, free. Pro removes these limits and adds downloads and saving decoded files.

Free preview · Pro required to export. Encode and decode up to 3,000 characters, or encode a file up to 256 KB, free. Pro removes these limits and adds downloads and saving decoded files.

Loading…

Why use this tool?

  • Base64 turns binary or special characters into plain letters and digits, which is how images get embedded in CSS and HTML and how many APIs carry credentials and tokens.
  • Developers regularly need to see what a Base64 string actually contains when debugging a request, an email header or a configuration file.
  • Writing a small image straight into a stylesheet or an email template avoids an extra file request, and needs a data URI.
  • A JWT is three Base64URL sections, and reading the header and payload is the first step in checking what a token claims.

How to use Base64 Encoder

  1. Choose Encode or Decode at the top of the Text panel.
  2. Paste your text. In Encode mode this is plain text; in Decode mode it can be Base64, a data URI or a JWT.
  3. Tick the URL-safe alphabet option if the data uses - and _ in place of + and /, or if you want that form as output.
  4. Read the result on the right, along with input bytes, output length and the size overhead. Press Copy or Download.
  5. To encode a file, drop it onto the area labelled Drop a file or click to browse (up to 8 MB). You get a data URI and a Copy raw Base64 button.
  6. If decoding a data URI, press Save as a file to download the original bytes.

Features

  • Encode and decode with UTF-8, so non-English text and emoji round-trip correctly
  • Optional URL-safe alphabet for encoding and decoding, with padding removed on output
  • File to data URI, with a preview for images and a button to copy only the Base64 part
  • Decode a data URI back to a downloadable file, with a file extension chosen for common types
  • Detects a JWT and displays its decoded header and payload as formatted JSON
  • Warns if the text you are encoding already looks like Base64
  • Input size, output size and overhead percentage

Supported formats

Text in and out, and any file type as input for a data URI, up to 8 MB. Decoded data URIs download with a matching extension for PNG, JPEG, GIF, WebP, SVG, PDF, JSON, plain text, CSV and HTML, and as .bin for anything else.

Tips

  • Base64 is encoding, not encryption. Anyone can decode it, so never use it to hide a password.
  • Expect the encoded form to be about a third larger than the original; the Overhead figure shows the exact amount.
  • If decoding fails, check whether the string came from a URL or a JWT. Those use the URL-safe alphabet, so tick that option.
  • The JWT view only reads the two readable sections. It does not check the signature, so a decoded token is not proof that it is genuine.

Frequently asked questions

Why does decoding say it is not valid Base64?

The string has characters outside the Base64 alphabet, or was cut short. If it uses - and _ rather than + and /, tick the URL-safe option and try again.

Does it handle accents, other scripts and emoji?

Yes. Text is converted to UTF-8 bytes before encoding, and decoded the same way, so characters outside basic English survive a round trip.

What is the largest file I can encode?

Eight megabytes. Larger files are refused because the encoded string is a third bigger and very long strings can freeze the browser tab.

What is the difference between standard and URL-safe Base64?

URL-safe replaces + with - and / with _, and drops the trailing = padding, so the string can sit in a URL or file name without escaping.

Can it decode a JWT?

It shows the header and payload as readable JSON when you paste a token in Decode mode. It does not verify the signature.

Are my files or text uploaded?

No. Encoding and decoding happen in your browser, and nothing you enter is sent to HubToolify.

Can I try this Pro tool without an account?

Yes. Encode and decode up to 3,000 characters, or encode a file up to 256 KB, free. Pro removes these limits and adds downloads and saving decoded files. Your own input is processed locally in your browser.

Will upgrading keep my work?

Checkout and login open in a separate tab. Keep the workspace open to retain inputs, settings and previews. Files stay in that tab only; keep the originals in case you close or reload it. Export access is checked with the server after payment.

Your files are processed directly in your browser and are not uploaded to HubToolify's servers.