Im base 64 encoding a string to use as a URL param.

I know base 64 can use characters such as '/' which do not play well with URLs so:

```
$encoded = base64_encode($value);
return str_replace(array('+', '=', '/'), array('-', '_', '~'), $encoded);

```

I was just wondering, how can I get the encoded base 64 string (with the replaced chars) back to it's original form?