HCODX/Base64 Decode
100% browser-based · UTF-8 safe · Auto-detect URL-safe

Base64 Decode

Decode Base64 to plain text in your browser. Auto-detects the URL-safe variant, tolerates missing padding and whitespace/line breaks. Uses native atob with UTF-8 decoding via TextDecoder.

Base64 input
Decoded text
Decode options
Reverse (Text → Base64)
Input size
0 B
Output size
0 B
Ratio
Status
Ready
Example

Base64 in, text out

Each 4 Base64 characters become 3 bytes of output. Padding and whitespace are tolerated unless strict mode is on.

Base64
SGVsbG8sIHdvcmxkIQ==
Plain text
Hello, world!
Use cases

What you'll use this for

Base64 is the lingua franca of "binary over text" channels — embed bytes inside JSON, HTTP, URLs, email, or environment variables.

HTTP Basic auth

Decode the value of an Authorization: Basic ... header to inspect the user:password.

JWT payload

Decode a JWT's middle segment (URL-safe Base64) to see the claims.

Data URIs

Pull out the bytes of a data: URI to inspect file content.

Email headers

Decode MIME-encoded headers that wrap non-ASCII in Base64.

Step by step

How to Base64-decode text

1

Paste your Base64

Standard or URL-safe; padding optional with auto-detect.

2

Pick variant

Auto handles both; force one if you know the format.

3

Click Decode

Runs locally with atob + UTF-8 decode.

4

Copy or download

Copy to clipboard or save as .txt.

FAQ

Frequently asked questions

Yes. The decoder converts Base64 to bytes, then decodes those bytes as UTF-8 — so non-ASCII text round-trips correctly.

By default whitespace is stripped before decoding (MIME-style input works). Toggle Strict mode to reject any non-Base64 character.

Yes. No signup, no limits, no ads.

Auto-detect adds the missing = characters. Strict mode requires exact padding.

Standard Base64 uses + and /; URL-safe uses - and _ so the output is safe in URLs. Auto-detect spots URL-safe input by the presence of - / _.

About

About Base64 decoding

RFC 4648 defines two Base64 alphabets: the standard alphabet (+, /) and the URL-safe alphabet (-, _). Both round-trip through this decoder.

How decoding works

  • Strip whitespace (unless strict mode is on).
  • Convert URL-safe characters back to standard (if URL-safe detected).
  • Pad with = to a length multiple of 4.
  • Run native atob to get a byte string.
  • Decode bytes as UTF-8 with TextDecoder.

What it can't decode

  • Binary data shown as text. If the original bytes don't form valid UTF-8 (e.g. a PNG file), the output will contain replacement characters.
  • Non-Base64 input. Strict mode rejects unknown characters; loose mode silently strips them.
Related

Related tools