Developer tools

Base64 Decoder

Base64 Decoder

Decode Base64 to text or a file, with URL-safe and data URL support.

About this tool

About Base64 Decoder

Paste Base64 and read what is inside. The decoder is forgiving about the things that break other tools: it ignores spaces and line breaks from emails and PEM files, accepts the URL-safe alphabet with - and _ used in JWTs and web tokens, works with or without = padding, and strips a data: prefix automatically. Text is decoded as UTF-8, so accents, non-Latin scripts and emoji come out right. If the bytes are not text, it tells you so and names the format it recognises, such as PNG, JPEG, PDF, ZIP or gzip; switch Output to File to see a preview and download it with the correct extension. When the input really is broken, you get the exact position of the first invalid character, or a note that the data looks truncated, instead of a blank result. Click Swap to re-encode the output and confirm the round trip. Everything happens in your browser, so tokens and private files stay with you.

Built and maintained by Abhi JainUpdated

How to Decode Base64

  1. 1

    Paste the Base64

    Paste Base64 or a data: URL into the left pane, or click Sample.

  2. 2

    Choose the output

    Leave Output on Text to read it, or choose File to preview and download binary data.

  3. 3

    Copy or download

    Copy the decoded text or download the file. Fix any error using the position shown.

Base64 Decoder: questions and answers

How do I decode a Base64 string?

Paste it into the box. The decoded text appears immediately. If it is binary data, choose File as the output to download it.

How do I convert Base64 to a PDF or image?

Choose Output: File and paste the Base64. The tool detects PDF, PNG, JPEG and other formats from the first bytes and offers a download with the right extension. For images you can also use Base64 to Image.

Why does it say invalid character?

Base64 contains only A–Z, a–z, 0–9, + and / (or - and _), plus = at the end. Quotes, commas or a cut-off copy are the usual culprits; the error shows the position.

Can I decode a JWT here?

Each JWT part is URL-safe Base64, so pasting one part works. The JWT Decoder splits the token and shows the header, claims and expiry for you.

More Base64 Encoder presets