If you do not want to install a npm package for this you can use
tar -cv file | base64
It also supports compression! tar -cv --gzip file | base64
Sadly it is not human readable, unlike this utility.