I have been doing a lot of work with binary protocols (esp. for crytography) that encode ciphertext in base64.
To help with debugging these protocols and data, I wanted something that could show me the ones and zeros associated with a piece of data.
You may be able to use sed, base64, and hexdump to get the same functionality on a unix system, but I didn't mess around with that too much.
In an iPython shell
In [1]: %paste
In [2]: urlsafeb64_to_bitstring("NX6-")
Out[2]: '00110101 01111110 10111110'
In [3]: s = urlsafeb64_to_bitstring("NX6-")
In [4]: s
Out[4]: '00110101 01111110 10111110'
In [5]: bitstring_to_urlsafeb64(s)
Out[5]: 'NX6-'