Find your next tool

Browse tools or search by task

Explore JSONToonPro

Encoding & Decoding Tools

Base64 Decode Online – Free Base64 Decoder to Text

Decode Base64 to readable text online, including standard and URL-safe strings. Handle Unicode safely and keep encoded data private in your browser.

Runs locally in your browser. Nothing you paste is uploaded.

Base64 Decode workspace
Base64 Input
0 chars
Text Output
Result appears here...

How to Decode Base64 Online

Paste Base64 and select Decode to recover UTF-8 text. Whitespace is ignored and URL-safe alphabet characters are normalized. If decoding fails, check whether you copied a complete payload rather than a whole data URI or JWT.

Standard Base64 vs Base64URL

Standard Base64 uses plus and slash; Base64URL uses hyphen and underscore. URL-safe input may omit equals padding. These are alphabet conventions for the same kind of byte representation, not separate encryption methods.

Decoding Text, Unicode and Binary Data

Decoding first recovers bytes and then interprets them as UTF-8. Arbitrary binary files are not necessarily text and can fail this step. Use Image to Base64 for supported image data rather than assuming all decoded bytes should be readable.

Why Base64 Is Encoding, Not Encryption

The phrase base64 decrypt is misleading: no secret key is involved. Base64 is reversible encoding. Decoding does not authenticate a payload or establish that its content is trustworthy.

Common Base64 Decode Errors

Invalid characters, incomplete groups, misplaced padding and non-UTF-8 bytes can cause errors. A JWT contains separately encoded segments; use JWT Decoder for its structure. Remove a data URI prefix before decoding only the Base64 payload as text.

More examples and technical details

How Base64 Decoding Works

Decoding runs the encoding pipeline backwards. Each Base64 character is looked up in the 64 character alphabet to recover the 6 bit value it represents. Four of those values are concatenated into a 24 bit block, and that block is sliced back into three 8 bit bytes. Padding at the end tells the decoder how many of those bytes are real.

  1. Strip any whitespace and line breaks, which carry no meaning.
  2. Convert each character to its index in the alphabet, 0 to 63.
  3. Join four indexes into a single 24 bit block.
  4. Split the block into three bytes, most significant bits first.
  5. Discard one byte for every trailing equals sign, then interpret the bytes.

Worked Example: Decoding "SGVsbG8="

This string has eight characters, one of which is padding, so it decodes to five bytes rather than six.

Input: S G V s b G 8 =
Indexes: 18 6 21 44 27 6 60 pad
Bits: 010010 000110 010101 101100 011011 000110 111100
 
Block 1: 010010000110010101101100
bytes: 01001000 01100101 01101100 = 72 101 108 = H e l
Block 2: 011011000110111100 + padding
bytes: 01101100 01101111 = 108 111 = l o
 
Output: Hello

Why Decoding Fails

Base64 is strict about shape, and most failures come from a handful of causes:

  • Invalid characters. Anything outside A-Z, a-z, 0-9, plus, slash, and equals is rejected. Copying from a chat client that inserts smart quotes or a zero width space is a frequent culprit.
  • Wrong length. Standard Base64 length must be a multiple of four once padding is included. A truncated copy and paste is the usual cause.
  • Missing padding. Many producers strip trailing equals signs. Add them back until the length divides by four.
  • URL-safe input in a standard decoder. Dashes and underscores are not in the standard alphabet and must be translated first.
  • Double encoding. If the decoded output is itself another valid looking Base64 string, the value was probably encoded twice.

Standard Base64 vs URL-Safe Base64

Standard Base64 uses plus and slash for indexes 62 and 63. Both are awkward in a URL: slash is a path separator and plus means a space in form encoded data. RFC 4648 section 5 therefore defines a URL and filename safe variant.

Standard index 62 = + index 63 = / padding kept
URL-safe index 62 = - index 63 = _ padding usually stripped
 
Standard: rqXRQrq/MQ==
URL-safe: rqXRQrq_MQ

JSON Web Tokens always use the URL-safe form without padding, which is why a JWT segment pasted into a strict standard decoder often fails. Convert dash to plus, underscore to slash, and pad the length up to a multiple of four before decoding.

Is the Decoded Output Text or Binary?

Base64 carries no type information, so the decoder cannot tell you what the bytes mean. If the result renders as readable words or valid JSON, it was text, almost always UTF-8. If you see replacement characters, control codes, or unprintable symbols, the payload was binary. A short signature at the start is often enough to identify it: bytes 89 50 4E 47 mean PNG, FF D8 FF means JPEG, 25 50 44 46 means PDF, and 50 4B 03 04 means a ZIP archive (which includes .docx and .xlsx files).

Decoding is not authenticationBeing able to decode a value proves nothing about where it came from. Base64 has no signature and no integrity check, so never treat decoded content as trusted input. Validate it exactly as you would validate anything else sent by a client.

The Base64 Alphabet

Every 6 bit group produces a value between 0 and 63, and that value is looked up in the table below. RFC 4648 fixes this ordering: uppercase letters first, then lowercase, then digits, then the plus and slash characters. The padding character (=) is not part of the alphabet, it only marks the end of an incomplete group.

IndexChar
0A
1B
2C
3D
4E
5F
6G
7H
8I
9J
10K
11L
12M
13N
14O
15P
IndexChar
16Q
17R
18S
19T
20U
21V
22W
23X
24Y
25Z
26a
27b
28c
29d
30e
31f
IndexChar
32g
33h
34i
35j
36k
37l
38m
39n
40o
41p
42q
43r
44s
45t
46u
47v
IndexChar
48w
49x
50y
51z
520
531
542
553
564
575
586
597
608
619
62+
63/

Working on something related? Browse every free developer tool on the site, including a Base64 encoder, JWT decoder, URL decoder, and JSON formatter. Everything runs entirely in your browser, so nothing you paste is ever uploaded.

Standards and references

Frequently asked questions

How do I decode a Base64 string?

Paste the encoded string in Decode mode and read or copy the text output.

Can Base64 be decrypted?

Base64 is decoded, not decrypted. It does not provide encryption or require a secret key.

What is the difference between Base64 and Base64URL?

Base64URL changes plus and slash to hyphen and underscore and often omits padding.

Why does a Base64 string fail to decode?

The input may be malformed, incomplete, include a wrapper prefix, or represent bytes that are not valid UTF-8 text.

Is decoded content sent to a server?

No. Input is processed in this browser tab and is not uploaded by the tool. Copy and download are actions you control; ordinary page analytics do not receive tool input.