Yo! Base64 Decode logoYo! Base64 Decode

Base64 DecodeFree Online Base64 Decoder

Paste a Base64 string or upload a file and get the decoded output instantly. Free and browser-based, supports UTF-8, URL-safe Base64 (-_), and data URI images. Nothing leaves your device.

Browse the Base64 decode quick reference or read the decoding guides.

For encoded binaries (like images, documents, etc.) use the file upload form below.
Decode base64 strings in real-time as you type or paste.

What is Base64 decoding?

Base64 is a binary-to-text encoding that represents arbitrary bytes using 64 printable ASCII characters: the uppercase lettersA–Z (values 0–25), lowercase a–z (26–51), digits0–9 (52–61), and + (62) and / (63). Every 3 bytes of input become 4 Base64 characters. When the input length is not a multiple of 3, one or two = padding characters are added at the end, which is why so many Base64 strings finish with = or ==. Decoding simply reverses this: it reads the Base64 characters back into the original bytes. I built this decoder to do that instantly, in your browser, with no upload step.

A worked example

Take the Base64 string SGVsbG8sIFdvcmxkIQ==. Decoding it returns the text Hello, World!. The trailing == tells the decoder the original data did not fill the final 3-byte group. Paste that string into the decoder above and you will see the same result. To learn why the equals signs matter, see my guide on Base64 padding.

Base64 is encoding, not encryption

This is the single most common misunderstanding, and it is why people search for a “Base64 decrypt” tool. Base64 has no key and hides nothing: anyone can decode it back to the original bytes. It exists to move binary data through text-only channels such as email, JSON, and URLs, not to keep secrets. If you actually need to protect data, use real encryption (for example AES), then Base64-encode the ciphertext for transport if needed. Decoding Base64 is never “decrypting” anything.

Decode Base64 images and files

Base64 is frequently used to embed images inside HTML, CSS, and JSON as a data URI that begins with a prefix likedata:image/png;base64,. Paste the full string, including that prefix, and the tool reconstructs the picture. For binary delivered as a .txt file of Base64, use the file upload option to decode and download the original file. Because decoding produces raw bytes, the output is written in binary form rather than corrupted as text. There is a full walkthrough in my guide to decoding a Base64 image.

URL-safe Base64 and JWTs

URL-safe Base64 (RFC 4648 §5) swaps + and / for - and _ so the string is safe in URLs and filenames, and it is the encoding used inside JSON Web Tokens. A standard-only decoder fails on this input; this decoder accepts both alphabets automatically. If you are weighing it against percent-encoding, see Base64 vs URL decode.

Where Base64 shows up

  • HTTP Basic Auth headers (Authorization: Basic ...)
  • Email attachments encoded with MIME
  • Inline images as data URIs in HTML and CSS
  • Binary blobs inside JSON and XML API responses
  • The header and payload segments of JWTs

Decode Base64 in your own code

The decoder above is handy for quick checks; in a program you usually decode in code. The essentials per language:

  • Python: base64.b64decode(s).decode("utf-8") full guide
  • PHP: base64_decode($s, true) for strict mode — full guide
  • Bash / Linux: echo "$s" | base64 -d full guide
  • Go: base64.StdEncoding.DecodeString(s) full guide
  • PowerShell: [Convert]::FromBase64String($s) full guide
  • Node.js / JavaScript: Buffer.from(s, "base64").toString("utf-8")

Privacy and history

Everything runs locally in your browser. I do not store, transmit, or analyze anything you paste, you can confirm this by decoding with your Network tab open and seeing zero requests. The recent-decode history is kept only in your browser’s local storage, never leaves your device, and you can clear it whenever you like. All features are free, with no account required. When you need to go the other way, my Base64 encoder is the mirror of this tool.

Built and maintained by Ishan Karunaratne, a developer who reaches for Base64 decoders often and wanted one that is fast, private, and correct on the edge cases (padding, URL-safe input, and binary output). I also write about web development and security at techearl.com.

Base64 Decode: Frequently Asked Questions

What is a Base64 decoder?

A Base64 decoder converts a Base64-encoded string back into the original data it represents, either readable text or raw binary such as an image or file. Base64 encoding maps every 3 bytes of input to 4 ASCII characters drawn from A-Z, a-z, 0-9, and + and /, which is why encoded data looks like scrambled letters and digits ending in one or two = padding characters. Decoding reverses that mapping. Yo! Base64 Decode is a free online Base64 decoder that does this entirely in your browser: paste a string or upload a file, choose the character set (UTF-8 by default), and the decoded result appears instantly. Nothing is uploaded to a server.

How do I decode a Base64 string?

Paste the Base64 string into the decoder and the original text appears immediately. To get correct output you only need to match the character set the data was encoded with, which is UTF-8 in almost all cases; if you are unsure, the Auto-detect option will pick it for you. The decoder also tolerates line breaks and whitespace that often appear in Base64 from email (MIME) or the command line. If your string came from a URL or a JWT, it may use the URL-safe alphabet (- and _ instead of + and /); this tool accepts both. Because everything runs client-side in your browser, you can decode sensitive values without them ever leaving your device.

Is it safe to decode sensitive data here?

Yes. All decoding happens locally in your browser using JavaScript, so the string you paste is never sent to a server, stored, or logged. You can verify this yourself: open your browser's developer tools, switch to the Network tab, and decode a value, you will see that no network request is made. This makes it safe to decode access tokens, JWTs, API responses, and other sensitive payloads. The optional decode history is also kept only in your browser's local storage, never transmitted, and you can clear it at any time. For maximum caution with secrets, you can disconnect from the network entirely and the decoder still works.

Can I decrypt Base64? Is Base64 decode the same as decrypt?

No, and this is the most common misconception. Base64 is an encoding, not encryption, so there is nothing to decrypt. Encryption protects data with a secret key so that only someone holding the key can read it. Base64 has no key: it simply rewrites bytes into a text-safe alphabet so binary data can travel through systems that expect text, such as email, JSON, and URLs. Anyone can reverse a Base64 string back to its original bytes, which is exactly what this tool does. So when people search for a Base64 decrypter, what they actually want is a Base64 decoder. If your data needs to stay secret, use real encryption (for example AES or age), not Base64.

Can I decode a Base64 image or file?

Yes. Base64 is often used to embed images and other binary files inside HTML, CSS, and JSON, usually as a data URI that starts with a prefix like data:image/png;base64, or data:image/jpeg;base64,. Paste the full string, including that prefix, and the decoder reconstructs the original image. For files delivered as a .txt file of Base64, use the file upload option to decode it and download the original binary (PNG, JPEG, PDF, ZIP, and so on). Decoding produces raw bytes, so the tool writes the result in binary form rather than mangling it as text. This is the reliable way to turn a Base64 blob from an API response or config file back into a usable file.

What is URL-safe Base64 and does this tool handle it?

URL-safe Base64, defined in RFC 4648 section 5, is a variant of standard Base64 that replaces the two characters that cause trouble in URLs and filenames, + and /, with - and _. It is the encoding used inside JSON Web Tokens (JWTs) and many web APIs, and it sometimes omits the trailing = padding. Standard Base64 and URL-safe Base64 are not interchangeable character for character, so decoding URL-safe input with a standard-only decoder fails. This decoder accepts both alphabets automatically, so you can paste a JWT segment or a token from a query string and decode it without converting the characters yourself first.

What is the difference between Base64 decode and Base64 encode?

Encoding and decoding are opposite directions of the same transformation. Base64 encoding takes raw bytes (text or binary) and rewrites them into the Base64 ASCII alphabet so they can move safely through text-only channels; the result is longer than the input by about a third. Base64 decoding takes that encoded string and reconstructs the original bytes. This site is a decoder: it turns Base64 back into the original text or file. If you need to go the other direction and turn text or a file into Base64, use the sibling encoder at yobase64encode.com. The two tools are mirror images and share the same browser-based, nothing-uploaded approach.

Related Conversion Tools
Decode History

Your decode history will appear here. Start decoding to build your history!