Go try these!
On the web we live a lot in the base64-encoded world. It is one of standard ways to encode data without worrying whether it can break things if one day is passed via GET parameter or by accident included into the web page. If you run your web services on Kubernetes whenever you play with its secrets, you need to encode-decode the values of these secrets.
Command line utilities
On Mac and Linux (and on Windows as well?) there are useful utilities to help you with base64 encoding-decoding, for getting input from the clipboard and for putting the results back there
$ echo Hello base64! | base64
$ echo SGVsbG8gYmFzZTY0IQo= | base64 -D
# Now let's put string to the clipboad.
# Then let base64 decode it from clipboard and put the results back
$ echo Hello base64! | pbcopy
$ pbpaste | base64 | pbcopy
Command line is cool, but somehow that still feels like a bit too many clicks and I spend good share of the workday in the browser, so most of the time I am actually using online encoders for base64. There are quite many of these, I personally was finding www.base64decode.org most convenient.
Unfortunately most of these tools share several issues:
- They are bloated. There’s a lot of data to fetch. That base64decode.org at the moment of writing this post was taking 5.2MB to load. Not a big deal for an office network, but still a bit of a delay, even more so when working remotely. For some reason it also freezes Chrome’s inspector if I open it on that page. Possibly it is a result of a code analysis protection, but I often brwose web with the inspector open and sudden freezes are not nice.
- Ads. I don’t mind some, but many tools have these too much
- Most of online tools perform encode-decode on the backend. It causes a bit of a delay, but the biggest issue is that your dear data is being transfered to someone else’s computer, so you better not use such services for the database passwords and such.
- Tracking cookies. There’s little way to avoid tracking on the web nowadays, but it would be nice to use tools that don’t do it or do it in some minimal manner.
So meet www.base64decode.xyz and www.base64encode.xyz.
You can see the source code on GitHub from where the site is autopublished to Netlify. Feel free to examine, clone and/or submit pull requests.
Whenever you release a personal project to the web, one thing that is always interesting is stats, even if only a couple of people a month visit the site. I am interested in knowing how many people actually find the tool useful, but how to find it out without analytics services that track your visitors and put cookies.
The simplest way just to count the page views, however, is to use server side stats. Unfortunately Netlify doesn’t provide these, but if you proxy the site through Cloudflare you can see how many requests Clouflare serves for you on that or another week and this particular bit of stats is free. I will probably cover this GitHub -> Netlify -> Cloudflare setup in one of the coming posts, so stay tuned if interested.
What do you, guys, think? Would you use such a base64 decoding-encoding tool online?
Update: I used https://www.base64encode.tk and https://www.base64decode.tk originally, but free domains and Freenom don’t get along so much that I don’t have access to these domains anymore, so relaunched on cool https://www.base64encode.xyz and https://www.base64decode.xyz