Skip to the Base64 decoder
freebase64decode.com

Free · No upload · No sign-up

Base64 decode, instantly.

Paste a Base64 string and get readable text, an image or a file back in the same keystroke. This Base64 decode online tool runs entirely in your browser — your data is never uploaded, never logged and never leaves your device.

Decodes as you type 20+ character sets Images, PDFs and JWTs Works offline

Base64 decoder and encoder tool

0 chars
Decoded output
Output: 0 B Type:

Nothing you paste is uploaded. Decoding happens in JavaScript on this page — you can disconnect from the internet and it still works. Ctrl + Enter to run.

3 steps

How to decode Base64 online.

01

Paste your Base64

Drop the string into the input box on the left. A whole file, a data: URI, a JWT or a single line — all fine. Whitespace and line breaks are stripped for you.

02

Read the result instantly

Decoding starts as you type. There is no “submit” step and no waiting, because the work happens in your browser rather than on a server.

03

Copy, download or inspect

Copy the text, download binary output as a real file, flip to the hex view, or preview a decoded image right on the page.

What you get

A Base64 decoder that tells you what it found.

Most online decoders hand back a wall of characters and leave you to guess. This one identifies the payload, repairs the common encoding mistakes, and shows the result in whatever form actually helps.

Nothing leaves your device

Every byte is decoded by JavaScript on this page. No upload, no request, no logging — check your network tab.

Automatic format detection

PNG, JPEG, GIF, WebP, SVG, PDF, ZIP, MP4, JSON, XML and HTML are recognised from their signature bytes and labelled for you.

Base64 image preview

Decode an image and see it rendered immediately, with its real pixel dimensions and file size, then download it as a proper file.

20+ character sets

UTF-8, UTF-16, Latin-1, Windows-1250/1251/1252, Shift_JIS, GBK, Big5, KOI8-R and more — decoded locally, with auto-detection.

Hex dump view

Binary output gets a classic offset / hex / ASCII dump so you can inspect headers and magic bytes without leaving the page.

JWT aware

Paste a JSON Web Token and the header and payload are unpacked into a readable table, with timestamps converted to dates.

Forgiving input

Missing padding, URL-safe “-” and “_”, stray whitespace, MIME line wrapping and full data: URIs are all handled automatically.

Line-by-line mode

Decode a list of independent Base64 values in one pass, one result per line — handy for log files and exports.

Encoding too

Flip the switch to encode text or any file into Base64, with MIME line wrapping, the URL-safe alphabet, or a ready-made data: URI.

Comparison

How this compares to a typical online Base64 decoder.

Feature comparison between freebase64decode.com and typical server-based Base64 decoding tools
Feature freebase64decode.com Typical server-based tool
Decoding runs entirely in your browser Always Only in “live mode”
Character sets without a server round-trip 20+ charsets, offline Server-side only
File size limit Your device’s memory 100 MB, uploaded
Decoded image preview Built in Not available
Hex dump of binary output Built in Not available
JWT header and payload view Automatic Not available
URL-safe alphabet and padding repair Automatic Manual
data: URI detection Automatic Manual
Works with no internet connection Yes, after first load No
Accounts, ads or sign-up None Ads

Guide

What is Base64?

Base64 is an encoding, not encryption. It rewrites arbitrary binary data using only 64 printable ASCII characters so that the data survives systems that were built for text. It provides no confidentiality whatsoever: anyone can decode it, which is exactly what this page does.

The scheme takes three bytes (24 bits) at a time and splits them into four 6-bit groups. Each group indexes into the alphabet A–Z, a–z, 0–9, + and /. Because 3 bytes become 4 characters, Base64 output is always about 33% larger than the input. When the input length is not a multiple of three, the result is padded with one or two = characters.

A worked example

Take the word Man. In ASCII those three characters are the bytes 77, 97 and 110, which in binary form the 24-bit sequence 010011010110000101101110. Split into four 6-bit groups you get 19, 22, 5 and 46 — and looking those indexes up in the Base64 alphabet gives TWFu.

How the three bytes of “Man” become the four Base64 characters “TWFu”
Text Man
ASCII 7797110
Bits 010011010110000101101110
Index 1922546
Base64 TWFu

Where you actually meet it

  • Email. MIME encodes attachments in Base64, wrapped at 76 columns.
  • Data URIs. data:image/png;base64,… inlines an image into CSS or HTML.
  • JSON Web Tokens. Each of the three JWT segments is Base64url with the padding removed.
  • HTTP Basic auth. Authorization: Basic carries user:password in Base64 — decodable by anyone, which is why it needs HTTPS.
  • Config and secrets files. Kubernetes secrets, certificates and private keys are routinely stored Base64-encoded.
  • APIs and databases. Binary blobs travelling through JSON, XML or a text column.

Standard vs. URL-safe Base64

RFC 4648 defines two alphabets. The standard one uses + and /, which both have special meaning inside a URL. The URL-safe variant (section 5, sometimes called Base64url) swaps them for - and _, and usually drops the = padding entirely. This decoder detects which one you pasted and converts automatically — a string containing - or _ is treated as URL-safe unless you force the setting yourself.

How to decode a Base64 image

A Base64 image is usually stored as a data URI: a data:image/png;base64, prefix followed by the encoded bytes. Paste the whole thing — prefix included — into the decoder above. The prefix is recognised and stripped, the signature bytes are checked, and the picture is rendered in the Preview tab with its real dimensions. Use Download to save it as a genuine .png, .jpg, .gif, .webp or .svg file.

If the preview stays blank, the bytes are not a valid image. The usual causes are a truncated string, a copy that lost its last characters, or double encoding — check the Hex tab and look for a known signature such as 89 50 4e 47 for PNG or ff d8 ff for JPEG.

Common decoding errors, and what they mean

  • “Invalid character at position N.” Something in the string is outside the Base64 alphabet — most often a stray quote, an ellipsis from a truncated copy, or a URL-safe character while strict decoding is forced.
  • Length is not a multiple of 4. The padding was removed. Turn Repair padding on; if the remainder is exactly one character, the string is genuinely truncated and cannot be recovered.
  • Mojibake — é instead of é. The bytes were decoded with the wrong character set. Try UTF-8 first, then Windows-1252.
  • Unreadable symbols everywhere. The payload is binary, not text. Switch to the Hex or Preview tab and download it instead.

Reference

Base64 decode in Python, JavaScript, Linux and more.

Once you have checked a value in the decoder above, you usually need the same thing in code. Every snippet below is copy-paste ready and covers the parts that normally bite: character sets, the URL-safe alphabet, and missing padding.

Python Base64 decode

Python's base64 module is in the standard library — no install needed. b64decode always returns bytes, so call .decode() when you want a str.

python
import base64

# Base64 string -> text
encoded = "SGVsbG8sIHdvcmxkIQ=="
text = base64.b64decode(encoded).decode("utf-8")
print(text)                      # Hello, world!

# Reject anything that is not valid Base64 instead of silently skipping it
base64.b64decode(encoded, validate=True)

# URL-safe alphabet (RFC 4648 section 5): "-" and "_" instead of "+" and "/"
base64.urlsafe_b64decode("SGVsbG8_d29ybGQtMQ==")

# Unpadded input (JWTs, URL parameters) raises binascii.Error -- pad it first
def b64decode_any(s: str) -> bytes:
    s = s.replace("-", "+").replace("_", "/")
    return base64.b64decode(s + "=" * (-len(s) % 4))

# Base64 -> image file on disk
with open("logo.png", "wb") as f:
    f.write(base64.b64decode(image_b64))

# Decode every line of a file separately
with open("encoded.txt") as f:
    for line in f:
        print(base64.b64decode(line.strip()).decode("utf-8"))

FAQ

Base64 decoding, answered.

What is Base64 decode?

Base64 decode is the process of turning a Base64-encoded string back into the original bytes it represents. Base64 encoding takes binary data and rewrites it using 64 printable ASCII characters so it can travel safely through systems that only handle text, such as email or JSON. Decoding reverses that mapping: every four Base64 characters become three original bytes.

How do I decode a Base64 string online?

Paste the Base64 string into the input box at the top of this page. The decoded result appears immediately in the output box beside it — there is no button to press and no waiting. You can then copy the text, download it as a file, view it as a hex dump, or preview it if the result is an image.

Is this Base64 decoder safe to use with sensitive data?

Yes. All decoding happens in JavaScript inside your own browser, so your input is never uploaded, transmitted, logged or stored anywhere. You can verify this by opening your browser developer tools and watching the network tab while you decode, or by disconnecting from the internet — the tool keeps working after the page has loaded.

Is Base64 encryption? Is it secure?

No. Base64 is an encoding, not encryption. It offers no security at all because anyone can reverse it without a key or password, which is exactly what this page does. Never use Base64 to protect passwords, tokens or personal data. Use real encryption such as AES, and TLS for data in transit.

How do I decode a Base64 image?

Paste the full data URI, including the data:image/png;base64, prefix, or just the encoded part on its own. The prefix is stripped automatically and the image signature is checked, so the picture appears in the Preview tab together with its pixel dimensions and file size. Use the Download button to save it as a real PNG, JPEG, GIF, WebP or SVG file.

Why does my decoded text show strange characters like é or �?

That is a character set mismatch: the bytes are correct but they are being interpreted with the wrong encoding. Set the character set option to UTF-8 first. If the data came from an older Windows application, try Windows-1252 or ISO-8859-1. Leaving the setting on Auto-detect tries strict UTF-8 first and falls back to Windows-1252.

What does “invalid Base64” mean and how do I fix it?

It means the input contains a character outside the Base64 alphabet, or its length is not a multiple of four. The usual causes are a truncated copy, a quotation mark or ellipsis that came along with the text, or a URL-safe string using - and _ . Keep the Strip whitespace and Repair padding options on, and the decoder fixes most of these automatically.

What is the difference between standard and URL-safe Base64?

Standard Base64 (RFC 4648 section 4) uses + and / as its last two characters, both of which have special meaning inside a URL. URL-safe Base64, also called Base64url (RFC 4648 section 5), replaces them with - and _ and usually omits the = padding. This decoder detects which variant you pasted and converts it automatically.

Can I decode a Base64 file?

Yes. Click the File button or drag a file onto the input box. The file is read locally by your browser, decoded on your own device, and the result can be downloaded with the correct extension. Because nothing is uploaded there is no imposed size limit — the practical ceiling is your device memory rather than a server quota.

How do I decode Base64 in Python?

Use the standard library: import base64, then base64.b64decode("SGVsbG8=").decode("utf-8"). b64decode always returns bytes, so call .decode() to get a string. Use base64.urlsafe_b64decode for the URL-safe alphabet, and pass validate=True if you want malformed input to raise an error instead of being silently ignored.

How do I decode Base64 in Linux or Bash?

Pipe the string into the base64 command: echo "SGVsbG8=" | base64 --decode. Use printf %s instead of echo if the trailing newline matters, base64 -d file > out.bin for files, and base64 -di to ignore line wrapping. On macOS and BSD the flag is a capital -D.

How do I decode Base64 in JavaScript?

In the browser, atob() decodes to a binary string, but it mangles non-ASCII text on its own. Convert the result to bytes and run it through TextDecoder: new TextDecoder().decode(Uint8Array.from(atob(b64), c => c.charCodeAt(0))). In Node.js use Buffer.from(b64, "base64").toString("utf8"), or the "base64url" encoding for URL-safe input.

Can I decode a JWT here?

Yes. Paste a JSON Web Token and the header and payload are unpacked into a readable table automatically, with issued-at and expiry timestamps converted into dates. The signature is shown but not verified, because verification requires the secret or public key — which this tool never asks for and could not use anyway, since nothing leaves your browser.

Does this tool cost anything or require an account?

No. It is completely free, has no sign-up, no account and no usage limits. It is a static page, so there is no server processing your data and nothing to bill you for.

Why is Base64 output larger than the original data?

Base64 represents every three bytes of input with four output characters, so the encoded form is roughly 33% larger, plus padding and any line breaks. That overhead is the price of being able to move binary data through text-only channels.

Decode Base64 without handing your data to anyone.

No account, no upload, no size limit, no ads in the way. Scroll back up and paste — the answer is already there.

Open the decoder

Short version: we do not collect your data, because there is nowhere for it to go. freebase64decode.com is a static website. Base64 encoding and decoding happen entirely in your browser using JavaScript. Whatever you paste, type, drop or upload never leaves your device and is never transmitted to us or to anyone else.

What we do not collect

  • The contents of the input or output boxes.
  • Files you load into the tool. They are read locally by your browser and never uploaded.
  • Accounts, email addresses, names or payment details — there is no sign-up.
  • Advertising or cross-site tracking identifiers.

What is stored on your device

One entry in your browser's localStorage called theme, which remembers whether you chose the light or dark appearance. It stays on your device, is readable only by this site, and clearing your browser data removes it. Nothing is stored in cookies.

Server logs

The site is served as static files by our hosting provider, Cloudflare Pages. Like any web host, Cloudflare processes standard request information — IP address, user agent, requested file, timestamp — in order to deliver the page and protect against abuse. We do not have access to your decoded content because it is never sent in a request. See Cloudflare's own privacy documentation for how that infrastructure data is handled.

Analytics

We use privacy-respecting, aggregate page-view measurement at most. No cookies are set for analytics, no personal profile is built, and no data is sold or shared with advertisers.

Your rights

Because we do not hold personal data about you, there is nothing for us to export, correct or delete. If you believe otherwise, write to hello@freebase64decode.com and we will respond.

Children

The service is not directed at children under 13 and we knowingly collect no data from anyone.

Changes

If this policy changes we will update the date below. Continued use after a change means you accept the revised policy.

Last updated: February 2026

By using freebase64decode.com you agree to these terms. If you do not agree, please do not use the site.

The service

freebase64decode.com provides a free, browser-based tool for encoding and decoding Base64 data. It is offered as-is, with no account, no fee and no guaranteed availability.

Acceptable use

  • Do not use the site for anything unlawful, or to process material you have no right to access.
  • Do not attempt to disrupt, overload, deface or reverse the hosting infrastructure.
  • Do not present the site as your own or redistribute it as a competing service.

No warranty

The tool is provided "as is" and "as available", without warranties of any kind, express or implied, including merchantability, fitness for a particular purpose and non-infringement. We do not warrant that results will be accurate, complete or uninterrupted. Always verify important results independently.

Limitation of liability

To the fullest extent permitted by law, freebase64decode.com and its operators are not liable for any indirect, incidental, special, consequential or exemplary damages, or for any loss of data, profits or goodwill, arising from your use of or inability to use the site.

Intellectual property

The site's design, text and code belong to their respective owners. The data you paste into the tool remains entirely yours — we never receive it, so we claim no rights over it.

Changes and termination

We may modify, suspend or discontinue any part of the site at any time without notice. Continued use after a change constitutes acceptance of the updated terms.

Last updated: February 2026

freebase64decode.com sets no cookies. There is no advertising cookie, no analytics cookie, no session cookie and no third-party tracker embedded in the page.

Local storage

We use a single localStorage entry, theme, so the site remembers whether you prefer the light or dark appearance between visits. This is not a cookie: it is never attached to network requests and is readable only by this site. You can remove it at any time by clearing site data in your browser.

Third parties

Fonts and scripts are served from this domain rather than a third-party CDN, so loading the page does not expose you to any external tracker.

Last updated: February 2026

The information and tools on freebase64decode.com are provided for general informational purposes only.

Base64 is not encryption

Base64 encoding provides no confidentiality. Anyone who obtains an encoded value can decode it without a key or password. Never rely on Base64 to protect passwords, tokens, personal data or anything else that needs to stay secret. Use real cryptography and transport it over HTTPS.

Accuracy

We aim to keep the decoder correct and the code examples working, but we make no guarantee that any output, explanation or snippet is accurate, complete or suitable for your situation. Verify results before relying on them in production.

Your responsibility

You are responsible for the data you process and for complying with any laws, licences and policies that apply to it. Do not decode or execute content from sources you do not trust.

External links

Links to third-party sites are provided for convenience. We do not control and are not responsible for their content or practices.

Last updated: February 2026

freebase64decode.com is a fast, free Base64 decoder built for people who reach for one several times a week: developers reading a config file, engineers inspecting a token, analysts pulling apart an export.

Why another Base64 tool?

Most online decoders post your data to a server, wrap the result in advertising, and stop at plain text. We wanted the opposite: everything computed locally, an interface that tells you what the bytes actually are, and enough depth — character sets, hex dumps, image previews, JWT unpacking — to avoid reaching for a terminal.

How it works

The page is a single static HTML document with a small amount of JavaScript, served from Cloudflare's edge network. Decoding uses the browser's own atob and TextDecoder APIs. There is no backend, so there is no request to intercept, no log to leak and no queue to wait in. Once the page has loaded it keeps working offline.

What it supports

  • Standard and URL-safe Base64, padded or unpadded.
  • More than 20 character sets, with UTF-8 auto-detection.
  • Files of any size your device can hold in memory.
  • Image, PDF, archive, audio and video signature detection.
  • JSON Web Tokens, data URIs and MIME-wrapped input.

Last updated: February 2026

Found a bug, decoded something the tool got wrong, or want a format supported? We would like to hear about it.

Email: hello@freebase64decode.com

When reporting a decoding problem

Please include your browser and version, the option settings you used, and — only if it contains nothing sensitive — a short sample of the input. Remember that we never see what you paste into the tool, so we cannot look it up on our side.

We read everything and reply to as much as we can, usually within a few working days.

Last updated: February 2026