Question: I would like to use TikZ in other settings than TeX and I'd especially like to use the drawings on websites where the text should be searchable and selectable. However, I'm unsure of the best way to convert my drawings to SVG.

How do I best take some TikZ code, render the drawing and turn the output into SVG?

Answer: 
I use tex4ht and set the PGF output format to SVG. This solution comes from page 110 of the pgfmanual <http://mirrors.ctan.org/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf>.

I've only used it to create SVG of a TikZ picture in an otherwise empty \documentclass{article} but it looks like you could use this to make html with SVG graphics of a large document.

The advantage of this approach is that the SVG is produced by PGF and you know you're getting vector graphics. Also you get the result in a single step. It won't do functional shading or matricies and text in the pictures can be a problem but there's more on fixing that in the pgfmanual.

* In the TeX or LaTeX document preamble before you load the TikZ package, e.g. with \usepackage{tikz} in LaTeX type:

```
\def\pgfsysdriver{pgfsys-tex4ht.def}

```
* Then process the TeX or LaTeX with httex or htlatex as appropriate. You may need to add tex4ht to your tex installation; it's at <http://www.tug.org/applications/tex4ht/>. For example to process my file called logoname.tex I do

```
htlatex logoname.tex

```
* The following output files are created in the current directory 

```
logoname.html 
logoname.css
logoname-1.svg

```

If you have more TikZ pictures in the document I assume they would become logoname-2.svg and so on. 

I'm able to look at the SVG output in firefox and inkscape so it seems to produce good results.
I find it very easy to use [InkScape](https://inkscape.org/) instead of [ImageMagick](https://imagemagick.org/).

Step 1: Use the [standalone](http://www.ctan.org/pkg/standalone) class and compile the .pdf version of your TikZ picture. You don't have to put in any other class options like 'convert' and the like.  

(example:`\documentclass[tikz]{standalone}`).

Step 2: Open the compiled pdf with [InkScape](https://inkscape.org/) instead of [ImageMagick](https://imagemagick.org/). File > Open > compiled.pdf.
This will open the pdf as an SVG. You can then save it in an SVG format or export it to any other format such as png, jpeg, etc.

Also, when you open the file in [InkScape](https://inkscape.org/), you can edit the individual components of your image. I find this very flexible to use.