LaTeX to SVG and PNG

Point an <img> at the equation and the equation arrives. SVG, PNG, GIF, PDF or MathML, from a single URL — or write it below and download it.

Open the full editor →

One URL per equation

fxTeX Server — formerly LaTeXRender — has been drawing equations from a URL since 2005. There is no script to load, no maths font, no library and no build step, which makes it the answer for blogs, forums, wikis, email and anywhere else adding JavaScript is impossible.

The address has three parts: /type.format?LaTeX. The type is what you get, the format is how it is delivered, and everything after the ? is the equation.

An SVG carries its own accessible label, so a screen reader announces the equation rather than the file name.

Add to your page:

<img src="https://fxtex.codecogs.com/svg.image?\frac{a}{b}+\sqrt{c}"
     alt="a over b plus root c">
a over b plus the square root of c
svg.image
the integral from 0 to 1 of x squared d x equals one third
png.image, \dpi{110}\fg{navy}

Both drawn just now, by the URLs in their src.

SVG or PNG?

The same equation, from the same service, both enlarged. Use SVG wherever it is taken; use PNG where only a bitmap will do, at the resolution you will print or show it.

SVG
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
A vector: drawn afresh at every size, so it stays sharp however far it is enlarged or however large it is printed.
PNG, 300 DPI
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
A bitmap: a fixed grid of pixels, 300 DPI unless you ask for another — sharp in print at its own size, soft if stretched beyond it. Every program takes one.

Both shown at the same size.

Every format, every option

Types

svg sharp at any size · png and gif bitmaps · pdf vector for print · mathml with spoken text · svgtext, a sixth of the size with selectable text.

Options, in the equation

\dpi{300} for resolution, \bg{white} and \fg{navy} for colour, \tiny to \Huge for size, \inline for an equation that sits in a line of text.

x squared plus 1
\fg{crimson}x^2+1
x squared plus 1
\bg{navy}\fg{white}x^2+1
x squared plus 1
\Large x^2+1

Formats

.image returns the image itself; .download sends it as a file; .json wraps it with any conversion errors. The old .latex URLs still work.

The full API, including how to escape +, spaces and & in a URL.

For a whole page, a whole site, or your own servers

LaTeX already in your HTML

Write $…$ in your pages and latexit.js turns each into an image — or fxTeX turns it into MathML in the browser, with no request per equation.

<p>Area $\pi r^2$</p>

Area pi r squared

Fast

Don't take our word for it: the speed page times a batch of real equations against the live service, in your own browser, with the cache bypassed. Run it →

Free for light use, or yours to run

Light use is free under the fair usage policy. For heavy traffic, a licence raises the limits — or, with an Enterprise licence, run it yourself in Docker.

Try it on the real thing

The full editor is on the home page, with suggestions as you type, history and every export format. It is free for non-commercial use — study, teaching, research or a personal site. Building it into something you sell needs a commercial licence.

Open the editor See licences

More ways to use it