Public APIs

This listing is not live yet. It will be published on August 5, 2026.

CodeCogs favicon

CodeCogs

Science & Math

Generate LaTeX equations as PNG, SVG, and GIF images.

CodeCogs's website screenshot

About CodeCogs

CodeCogs provides a LaTeX rendering engine accessed through URL-based requests, allowing equations to be converted into images for use on websites and mobile applications. A request is constructed by specifying an output type (png, gif, svg, emf, or pdf) and a format (image, json, javascript, or download), followed by the LaTeX markup for the equation. Rendered equations can be embedded directly via an HTML image tag pointing to the service's URL, with no local installation required.

The service supports formatting options within the equation request, including font size commands (\tiny, \small, \large, \LARGE, \huge), image resolution via \dpi, and background/foreground color settings via \bg and \fg using preset names or hexadecimal color codes. Requests made with the .json suffix return equation data as a JSON object containing the cleaned equation text, the requesting site, a generated file name, a cached image URL, and a base64-encoded version of the image, with GIF outputs additionally including width and height fields.

Cached equation images are stored on CodeCogs servers and are removed if not reused within 48 hours. The documentation includes an example using jQuery to fetch an SVG equation in base64 JSON format and insert it into a page as an image element. The product is aimed at developers who need to display mathematical notation on web pages or in mobile apps without installing a rendering library locally.

Key features

  • Renders LaTeX equations as PNG, GIF, SVG, EMF, or PDF images via URL request
  • Embeds equations directly in HTML using a simple img tag
  • Returns rendered equations as JSON with base64-encoded image data
  • Supports font size, DPI, background color, and foreground color options in the equation URL
  • Provides a downloadable image output mode in addition to inline display

Frequently asked questions

What image formats does CodeCogs support for rendered equations?

It supports PNG, GIF, SVG, EMF, and PDF output formats, with SVG becoming the main format going forward.

How do I embed a CodeCogs equation on my website?

You construct a URL with the LaTeX markup and use it as the src of an HTML img tag.

Can I get equation data in a format other than an image?

Yes, requesting the .json format returns a JSON object with the equation, file details, URL, and a base64 encoding of the image.

How long are rendered equation images cached?

The cache is routinely cleaned, and equations not reused within 48 hours are removed.

Can I customize the appearance of the rendered equation?

Yes, options like \tiny, \small, \large, \dpi{#}, \bg{#}, and \fg{#} let you control font size, resolution, and colors.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product