Skip to content
/ TikZ to PNG

TikZ to PNG

Paste your TikZ code: it is compiled by a real LaTeX engine in your browser, then exported as a sharp PNG image (×2 for screens, ×4 for print), with a transparent or white background. “Copy image” pastes it straight into Word, PowerPoint or Google Docs.

Examples:
Preamble (optional)

Your commands and TikZ libraries. Already loaded: tikz, amsmath, amssymb; pgfplots, tkz-tab and tikz-cd are added automatically when used, as are Otoolia's shortcuts (\R, \conj{A}, \proba…).

or Ctrl + Enter

Preview

The preview will appear here.

Fix a figure you already published

Paste the whole content of the “Custom HTML” block here (the TikZ code is kept as a comment at the start of the block):

Using the figure in WordPress

  • Paste the HTML block (recommended): add a “Custom HTML” block and paste the copied block. No image to upload, no plugin. The TikZ code is kept in the block as a comment, invisible to visitors: to fix a typo, paste the block back into “Fix a figure you already published”. You need an administrator account (WordPress strips SVG code pasted by other roles).
  • Upload the .svg file: WordPress refuses SVG by default; install the “Safe SVG” plugin, then insert the file with an “Image” block.

The figure adapts to the screen width, stays crisp at any zoom, and several figures can share a page. It also works on any website or in an HTML file.

Frequently asked questions

Is my code sent to a server?

No. The TeX engine (TikZJax, TeX compiled to WebAssembly) runs in your browser. It weighs about 7 MB, downloaded once on the first generation; your browser keeps it afterwards.

Which packages can I use?

TikZ and all its libraries (\usetikzlibrary{…} in the preamble), pgfplots, tkz-tab, tikz-cd, tikz-3dplot, amsmath, amssymb, array. For other packages (circuitikz, chemfig, tkz-euclide, venndiagram…), the Compile with the full engine button uses the TeX Live 2026 of Otoolia's LaTeX editor, still in your browser: you get a vector PDF and PNG images (no SVG).

Why is the SVG 40 to 80 KB?

The LaTeX fonts used by the figure are embedded in the file, so it displays identically everywhere without loading anything else. Once compressed by the web server, it is about half that size.

The figure does not compile: what now?

The tool points out the most common mistakes (unclosed braces or parentheses, missing semicolon, environment not closed). Custom commands must be defined in the preamble. To build a complex figure, Otoolia's LaTeX assistant generates trees, variation tables and plots without errors.

Engine: TikZJax (David Grice, after Jim Fowler), GPL-3.0 licence; tkz-tab package by Alain Matthes.

How to do it

  1. Paste the TikZ code (or try an example) and add your commands in the preamble.
  2. Click “Generate SVG”: the preview appears in a few seconds.
  3. Choose PNG ×2 or ×4, with “White background” if the document is dark or the image will be printed.
  4. Or click “Copy image” and paste it (Ctrl+V) into your document.

Tips

Frequently asked questions

Which resolution should I choose?

×2 gives about 190 dpi at LaTeX size, enough for screens; ×4 gives about 380 dpi, perfect for print.

My code uses circuitikz or chemfig: does it work?

Yes with the “Compile with the full engine” button, which uses TeX Live 2026 and gives a PNG and a vector PDF.

Is my code sent to a server?

No: the TeX engine (TikZJax, in WebAssembly) runs in your browser; it is downloaded once (about 7 MB) and then kept.