Base64 Decoder
Decode a Base64 string back to its original text — with optional URL-safe decoding, instantly inside your browser.
What does a Base64 decoder do?
Base64 text is a way of representing binary data — like an image, a file, or raw bytes — using only letters, numbers, and a few symbols. Decoding reverses that process, turning the Base64 text back into its original bytes and, for text content, the readable string it started as.
This tool decodes pasted Base64 text or an uploaded .txt file back into readable text, with an option for URL-safe decoding for Base64 that was encoded using the `-`/`_` alphabet instead of the standard `+`/`/` one.
GuideHow to use it
How encoding and decoding work
Encoding reads the input as raw bytes — either the UTF-8 bytes of typed text, or the exact bytes of an uploaded file — and maps every group of three bytes to four Base64 characters drawn from a 64-character alphabet. Decoding reverses that mapping to recover the original bytes, then interprets them as UTF-8 text. "URL-safe" encoding swaps the standard `+` and `/` characters for `-` and `_`, and omits trailing `=` padding, so the result can be used directly inside a URL without additional escaping.
Why it helpsFeatures & benefits
Why this runs entirely in your browser
Files and text encoded or decoded here can contain private data, so nothing is uploaded to a server. Every conversion runs in JavaScript locally in the tab, which means it keeps working offline once the page has loaded and nothing processed here persists after the tab is closed.
Common uses
Embedding a small image directly in CSS or HTML as a data URI, encoding binary data for a JSON API payload, decoding a Base64-encoded JWT segment or config value, or preparing a URL-safe token for a query parameter.
Frequently asked questions
A few things people usually want to know before trusting the numbers.
Base64 text must only contain valid Base64 characters and correct padding. Extra characters, truncated input, or non-Base64 text will trigger this error.
Some Base64 text is encoded with - and _ instead of the standard + and / to be safely used in a URL. Turning this on decodes that variant correctly.
Yes. Switch to File mode and upload a .txt file containing Base64 text.
Yes — switch to Encode mode at the top of the tool to go the other direction.
No. All decoding happens locally in your browser. Nothing pasted or uploaded here is sent to a server, stored, or shared.