Decode Base64 into a File
EncodingEverything runs locally in your browser — nothing is uploaded
Decoding happens entirely in your browser; nothing is uploaded. Line breaks, spaces, URL-safe - and _, and missing padding are all handled.
Turn a chunk of Base64 text back into a file — paste it, press download. It works with or without the `data:` prefix, and reads the type from that prefix (`data:image/png;base64,…` gives you `file.png` rather than `file.bin`). Pasting is messier than it looks, so everything tolerated here is something pasting causes, not a syntax error: line breaks and spaces are ignored entirely (PEM and MIME encoders wrap every 76 characters — that is the specification, not a mistake), the URL-safe `-` and `_` are understood (that is what JWTs use), and missing `=` padding is added. The three genuinely invalid cases are reported separately: characters outside the alphabet, a length of 4n+1 (no such encoding exists), and padding in the wrong place. ⚠️ One limitation: you have to supply the file name. Base64 carries no name, and the `data:` prefix only holds a type — the extension is all the tool can infer.
Features
- Decodes both bare Base64 and data URLs, pulling the declared type out of the prefix
- Infers the extension from the MIME type (png, pdf, woff2…), falling back to .bin rather than guessing
- Ignores line breaks, spaces and tabs — PEM-wrapped text pastes straight in
- Understands the URL-safe - and _ variants and missing = padding
- Reports the three invalid cases with distinct reasons, not a single “bad format”
- Shows the decoded size, the detected type and whether a data: prefix was present
- Decoding happens entirely in your browser; nothing is uploaded
How to use
- Paste the Base64 text (or the whole data URL) into the box
- The type and size appear at once; the status turns ready when it can be downloaded
- Adjust the file name if you like (it is pre-filled with the inferred extension)
- Press Download
FAQ
- Why is the decoded file called file.bin?
- Because the Base64 you pasted had no `data:` prefix, and so carried no type information at all — Base64 encodes bytes, not what those bytes are. With the prefix (`data:image/png;base64,…`) the tool can infer `.png`. That is also the practical lesson: handing someone bare Base64 leaves them unable to know what to open it with, so say what it is when you send it.
- Why is my pasted text reported as invalid?
- Three possible reasons, and the message distinguishes them. Characters outside the alphabet: Base64 uses only `A–Z a–z 0–9 + / =`, and anything else usually means other text got mixed in — pasting a whole `<img src="data:…">` tag including its quotes brings those quotes along, and they are not valid. A length of 4n+1: after whitespace is removed the character count is always a multiple of four, and a remainder of one means a character is missing or extras were added. Padding in the wrong place: `=` may only appear at the end.
- What is URL-safe Base64?
- Standard Base64 uses `+` and `/`, both of which mean something in a URL (`+` is read as a space), so a variant swaps them for `-` and `_` and usually drops the `=` padding. JWTs use that variant, as does anything that stuffs binary into a URL. This tool reads both, so there is nothing to replace by hand.
- Is pasting a very long Base64 slow?
- Decoding itself is fast (milliseconds even for several megabytes) — what is slow is the input box rendering that much text, which is exactly why “File to Base64” caps at 4 MB. If you only need to decode a large file, `base64 -d input.txt > output` on the command line will be far more comfortable.
Related tools
File to Base64
EncodingDrop any file to get its Base64 and a data URL ready for src or url(), plus MIME, sizes and the encoded length. Nothing is uploaded.
Base64
EncodingConvert text to Base64 and back, with correct UTF-8 handling for accents, CJK and emoji. Runs entirely in your browser — nothing is uploaded.
Image to Base64
WebConvert an image to Base64 or a data URL by dropping, choosing or pasting it. Resize and switch format, all locally — nothing is ever uploaded.
URL Encode
EncodingEscape text into %XX form and back again, treating a whole URL and a single parameter value as different jobs. Runs entirely in your browser.
HTML Entities
EncodingTurn < > & and quotes into HTML entities and decode them back in a single pass, so &lt; becomes <, not an angle bracket. Runs in your browser.
JWT Decoder & Verifier
EncodingDecode a JWT and verify an HS256, HS384 or HS512 signature with your secret, reading exp and nbf as dates. All local to your browser.