Base64 Decode

Paste Base64, read the original text. Handles URL-safe input, missing padding and binary files.

runs in your browserno uploadno sign-up

Decoded

Decoded text appears here.

How 3 bytes become 4 characters

Base64 reads your data 24 bits at a time — three 8-bit bytes — and re-slices those bits into four 6-bit numbers. Each number from 0 to 63 picks one character from the alphabet. Type something short and watch the regrouping; try one and two characters to see where the = padding comes from, and an accented letter to see UTF-8 at work.

bytes
480100100069011010012100100001
6-bit → char
01001018S0001106G10010036k10000133h

Hi! → SGkh

* When the last group is short, zero bits fill out the final 6-bit number, and = marks each missing byte so the length stays a multiple of 4.

Decoding done properly

Base64 represents bytes, not text, so decoding produces bytes that then have to be interpreted. This tool decodes the bytes and reads them as UTF-8, so "w6k=" correctly becomes é instead of the mojibake "é" that the browser’s built-in atob() gives on its own.

It accepts the standard alphabet (A–Z, a–z, 0–9, +, /) and the URL-safe variant from RFC 4648 §5 (- and _ instead of + and /), ignores whitespace and line breaks, restores missing = padding, and strips a data:…;base64, prefix. If the bytes are an image, PDF or other binary, it says so and offers a preview or download instead of printing garbage.

Frequently asked questions

Why does my decoded text look garbled?

Either the data is binary (an image, a zip, encrypted data) rather than text, or it was text in an encoding other than UTF-8. The tool detects common binary formats and shows a hex preview for the rest.

Is Base64 encryption?

No. Base64 is an encoding anyone can reverse — as this page shows. Never use it to hide passwords or secrets.

How do I decode a JWT?

A JWT has three URL-safe Base64 parts separated by dots. Paste the first or second part (the header or payload) to read its JSON. The third part is a binary signature.

What does "Invalid length" mean?

Every 4 Base64 characters hold 3 bytes. A string whose length is one more than a multiple of four cannot be valid — a character was lost or added when copying.