Base64 to binary nodejs
Aug 27, 2015 · I stored the Base64 encoded SVG in a file called svg.base64 and then I ran this new program as follows. jbiard$ node base64toSVG.js svg.base64 The program reads the data from the file provided (svg.base64) and then converts that to a string. The final step uses the toString('encoding') function of the Buffer class to convert the data back to ASCII. Base64 is an encoding scheme used to represent binary data in an ASCII format. This is useful when binary data needs to be sent over media that are usually designed to handle textual data. Concrete examples would be sending images in an XML file or in an email attachment. How does Base64 encoding work?