Standard Base64 uses + and / and may end in =. The URL-safe variant uses - and _ instead and usually drops the =. The same bytes written both ways look different but mean the same thing. This decoder reads either form, with or without padding.

>>>??? in the input.Pj4+Pz8/.Pj4-Pz8_. Try hello too: unchecked it is aGVsbG8=, checked it is aGVsbG8, without the =.Use URL-safe when the value goes into a web address, a file name or a token. Use the standard form when the system that receives it expects + and /.

In Decode mode, paste Pj4-Pz8_, Pj4+Pz8/, aGVsbG8 or aGVsbG8= and each one decodes. The tool swaps - and _ back for you and doesn't need padding. Spaces and line breaks inside the text are ignored.
Whether padding may be left off is a rule of the format that produced the text. Many web tokens leave it off; some APIs and email systems require it. Check the documentation of the receiving system rather than stripping every =.
You can read the header of a web token this way: eyJhbGciOiJIUzI1NiJ9 decodes to {"alg":"HS256"}. That only shows what the text says. It does not prove who made it, whether it has expired, or whether you should trust it. Treat decoded values as untrusted until the system that issued them has verified them.
! or . are not allowed. Remove them.= in the middle of the text is rejected. Decode them separately.= at the very end. Anything else is an error from the browser, not a valid value.Encoding and decoding happen in your browser and nothing is uploaded. Open the free Base64 Encoder.