Base64 encoding/decoding sample code

Big thanks to Nick Stephens for donating this sample code to do the not-so-simple algorithm for base 64 encoding/decoding. The comments in the chart refer to this [URL=“”]Wikipedia page on Base64.

Even if you’re not familiar with the term, I’m guessing you may have seen some base-64 encoded data at some point, perhaps in an email header, it looks like this:


Here’s the link to the chart you can import:

Note: this code is perfect for a subroutine, stay tuned more on converting your code into a subroutine.


Couldn’t find this as a subroutine anywhere. I had it as a subroutine in 9.5 (not sure if I converted it or someone else), but I needed it in 9.4 for a customer so I converted it (to 9.3 basic - the oldest any of my customers are using) and want to post it here for others and my future self. (8.3 KB)

Thanks @nick_stephens for the code.

1 Like