Turn code into a PNG image

Make a syntax-highlighted screenshot for a tutorial, presentation, or social post. Paste a snippet or open a source file, style it in the browser, and download a PNG. The editor is free and does not require an account.

Open the code image editor

How to export code as PNG

  1. Load your snippet. Open the editor preview and paste your code, or use Open file to choose a text source file. Drag and drop also works. File imports suggest a language from the file extension.
  2. Check the highlighting. Choose the language and a theme, then adjust font size, padding, title, and window chrome. On a phone, use Controls and Themes to open the panels.
  3. Set PNG and resolution. Open Export Settings, select PNG under Format, and choose 1x, 2x, 4x, or 6x. Start with 2x; higher scales produce larger images and use more browser memory.
  4. Download or copy. Select Download to save the image. Copy Image copies a PNG when your browser supports image clipboard access. Download instead if permission is denied.

PNG, JPEG, or SVG?

PNG is a lossless raster image: it keeps sharp text edges without JPEG compression artifacts and supports transparency. It is a useful starting point for code screenshots in documents and slides.

JPEG does not preserve transparency and uses lossy compression. Choose it when you need that format and have an opaque background. SVG is also available; check that your destination accepts it before exporting.

To remove the outer background, turn off Background in the editor controls and export as PNG. The code window keeps its theme background. Preview the result on the color where you plan to place it.

Keep your screenshot readable

Common questions

Is my code uploaded?

The browser editor renders locally and saves your latest snippet and settings in this browser’s local storage. A share link contains encoded code and settings, so anyone with that link can read them. The optional API and MCP server send code to the server for rendering. Do not include secrets in snippets or shared URLs.

Can I reopen a screenshot to edit the code?

A downloaded PNG is an image, not an editable code file. Keep the source or use Share Link to preserve an editable snapshot of the supported code and settings. Shared state is capped at 20,000 characters and 500 lines.

Can a script generate the image?

Yes. The REST API and MCP documentation explains server-side PNG and SVG generation, accepted settings, and error responses.

Create your code screenshot →