Decode Base64 on Frontend

I am trying to pass in a query parameter a URL that would contain another url.

Example: www.domain.com?fwd=Param1
and Param1 could have a random value such as: /page?p=1 or it could be /folder/page?p=1

In order to workaround this, I want to use Base64 encoding (ar any other URL encoding). Is there a way to do it on the front end?
Thanks

Community Page
Last updated: