Base64 Decode Online — Free Base64 to Text Decoder

Use this free Base64 decode online tool to turn Base64 into UTF-8 with strict validation—wrong padding or URL-safe mistakes are rejected with a clear error. Live output, copy, and download in your browser.

Loading tool…

What is Base64 decode?

Base64 decode online means turning a text-safe byte representation back into the original bytes—right in the page, without installing a terminal utility. Developers use decoding everywhere data travels through systems that only like ASCII: JSON fields, query strings, email MIME parts, and JWT segments (which use a URL-safe Base64 variant). Decoding is deterministic and fast, but it is not encryption: anyone who sees the Base64 can recover the bytes. This tool interprets decoded bytes as UTF-8 text. If the payload is really an image, PDF, or other binary, the text view may look like nonsense; use Base64 to image when you need a visual preview instead.

This Base64 decode flow is built for day-to-day debugging: you paste a string, you read UTF-8 text, you move on. For round-trip learning, use it together with a Base64 encode online workflow and the What is Base64? explainer on the blog when you need a refresher on how the alphabet and padding work.

How to use this Base64 decode online tool

  1. Paste your Base64 into the box above (standard +// or URL-safe -/_, with correct = padding).
  2. The result updates live for typical sizes. Very large pastes use Run so your tab stays responsive.
  3. Use Copy result or Download when the output looks right. Everything runs in your browser—no upload, no API round trip for the core decode.
  4. Pair with the Base64 encoder when you need the opposite direction, or the JWT decoder when you are inspecting three-part tokens.

Example

  • aGVsbG8= hello
  • SGVsbG8= Hello
  • SGVsbG8gV29ybGQ= Hello World

Common errors

  • Invalid Base64 string — characters outside the alphabet, spaces or line breaks inside the payload, truncated data, or a URL-safe typo (for example using - where = padding belongs) are rejected so you do not see misleading “almost right” text.
  • Missing or wrong padding — padding must match the length of the input; the tool adds = only when the symbol string is otherwise valid.
  • URL-safe confusion — URL-safe Base64 swaps +// for -/_. Mixing variants or padding incorrectly fails validation.

Use cases

APIs and logs: quickly verify whether a blob from a response or log line is well-formed Base64 before piping it elsewhere. JWT debugging: paste payload segments after you split the token, or use our dedicated JWT decoder. Images and data URLs: strip the data:…;base64, prefix and decode, or open Base64 to image for previews. Site maintenance: when you are auditing URLs and structured data, our sitemap generator pairs well with encoding and decoding workflows.

How Base64 decode works (step by step)

Decoding is the exact inverse: four symbol characters (after stripping whitespace) map back to 24 bits, then three bytes. Padding = encodes how many bytes in the last block are real. A correct decoder must reject non-alphabet characters and inconsistent padding, or you risk “successful” decodes of corrupted inputs.

Technical details

Strict decoders use an inverse lookup table; liberal decoders in the wild may ignore small errors, which creates interoperability bugs. This tool is intentionally strict to match the bytes you would get from a well-tested library, then interprets the byte sequence as UTF-8 text.

API and code examples

JavaScript Base64 decode example

atob in browsers expects Latin-1. For UTF-8 output, decode to bytes, then TextDecoder. In Node, Buffer.from(s, "base64").toString("utf8") is typical.

Python Base64 decode example

import base64 data = base64.b64decode("aGVsbG8=") print(data.decode("utf-8")) # hello

Handling URL-safe Base64

Replace - with + and _ with / (or use urlsafe_b64decode) before decoding, unless your library handles the profile automatically.

Base64 decode — frequently asked questions

Why do I see “Invalid Base64 string” for a string that looks close to valid?
The decoder is strict: wrong padding, illegal characters, or a URL-safe mix-up can still decode to bytes in weaker parsers, but those bytes are not what you intended. We reject those inputs instead of showing garbage.
Can I paste Base64 with line breaks?
This tool expects a single continuous Base64 string (whitespace in the middle is not accepted). Remove PEM-style wrapping or newlines before pasting.
Is there a server API for decoding?
Yes. POST JSON with { input, type: "decode" } to /api/base64. Treat that endpoint like any shared service: never send production secrets you are not authorized to process remotely.
My output looks like mojibake after decode—why?
The bytes are probably not UTF-8 (wrong charset at encode time) or the input was not text. Try hex inspection or a binary workflow instead of this UTF-8 text view.
How do I decode a JWT’s middle segment only?
Use the dedicated JWT decoder, which handles Base64url and JSON for you, instead of pasting a bare segment into the text decoder.

Related tools