svg2js is an SVG to HTML 5 <canvas> javascript converter. It is written in C and uses libsvg (based on the original libsvg) to parse the SVG document. It is available for both GNU/Linux and Windows operating systems.

svg2swf is another project that uses libsvg and it is an SVG to Flash SWF converter.

svg2js supports the subset of the SVG specification that is exposed by libsvg's API, svg.h, and is further limited by the capabilities of the HTML 5 <canvas> element. It includes partial support for styling, transformations, paths, shapes, text, painting, gradients, patterns, alpha compositing and clipping. It doesn't include support for masking, filters, fonts, interactivity, scripting and animation. The Ghostscript tiger example is shown here and the examples page shows the results for the SVG 1.1 test suite, providing an indication of the current implementation status.

svg2js is provided through Sourceforge. The software can be accessed via CVS and can also be browsed online. The build page explains how to build the software on Linux and Windows. The latest source code and Windows binary releases can be downloaded from here - the latest release is 0.1.

svg2js is free software and is available for distribution under the GNU Lesser General Public License (LGPL) version 2.1 software license.


Get svg2js at SourceForge.net. Fast, secure and Free Open Source software downloads Valid XHTML 1.0 Strict