jSignature depends on (more or less recent) jQuery, and (only for IE 7 and 8) on FlashCanvas. This does not mean its ASCII presumably if youre using this function at all, you expect to be working with binary data and not text. Then, remove the borders of the image. Create a file github.js with following code, HtmlToImage.jar will be the simplest way to convert a html into an image. Where does the idea of selling dragon parts come from? It's really a full web browser, just without a display attached. MGM, You are right. Uniform Type Identifier: public.svg-image. In the question title you write about string conversion, but in the question you talk about binary data (picture) so here is a function which makes a proper conversion starting from PNG picture binary data (details and reversal conversion are here). However, 2 years have passed since your comment. Can give me example how to transcoding Base64 String to SCV image? You can't do this 100% accurately with JavaScript alone. We do not currently allow content pasted from ChatGPT on Stack Overflow; read our policy here. Using it for the web? I changed my accepted answer :-), Great answer, but commenting on the state of art of HTML and Web APIs, which as usual looks like something pulled out someones behind -- all the functionality is technically there but exposed behind an array (no pun intended) of weird code paths that resemble nothing of the kind of clarity you would expect from a well designed APIs. Doh, so I implemented this for myself aswell. Directly from Mozilla, two nice functions for this purpose. HTML2Canvas exists to render HTML onto