I know how and I can convert the images to base64 via OS X and Linux terminals.

But I'm not sure if I can convert the fonts and the SVGs to base64 via offline OS X and Linux terminals.

I don't know any offline base64 apps that encode the images, fonts and SVG for OS X and linux. I know Coda 2 has base64 plugin, but it's bug and suffers a fail. TextMate has Emmet plugin that comes with base64 encoder, but I tried and it wasn't converted. Brackets has Emmet too, but Emmet doesn't have base64 plugin. These plugins convert only the images.

1 Answer 1


On both systems you can use the base64 command.


cat test.svg | base64

to encode and

echo "<base64>" | base64 -d

and replace -d with -D on macOS.

The base64 utility comes preinstalled on most Linux distros as well as macOS.

Source: https://scottlinux.com/2012/09/01/encode-or-decode-base64-from-the-command-line/

  • It appears that -d is valid also on macOS: ``` base64 --help Usage: base64 [-hvDd] [-b num] [-i in_file] [-o out_file] -h, --help display this message -Dd, --decode decodes input -b, --break break encoded string into num character lines -i, --input input file (default: "-" for stdin) -o, --output output file (default: "-" for stdout)``` Jun 24, 2021 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .