Turn code into a clean image

Paste code, pick a theme, download a PNG.

100%
Click a line number to cycle highlight, remove, and add.Formatted with Prettier on paste · TypeScript · 5 lines

Working with SVG? Try SVG code to image

Projects

Features

What Code to image can do

Code

  • 27 languages

    Syntax highlighting for TypeScript, Python, Go, Rust, SQL, YAML and more. Search the list to pick one.

  • Formatting

    Pasted code is tidied with Prettier for supported languages, and the Format button does it again after you edit.

  • Import a file

    Open a source file, like .ts, .py or .go. The language and file name are set from it.

  • Your Gists

    Signed in, search and load code you saved to your Gists.

  • Mark lines

    Click a line number to highlight a line, or mark it as added in green or removed in red.

  • Paste a diff

    A pasted git diff is detected and its added and removed lines are marked for you.

Look

  • 27 themes

    18 editor themes, like Dracula, One Dark, Nord and GitHub Light, and 9 canvas themes, like Nebula and Ocean. Search them by name.

  • Four sizes

    16:9 at 1920×1080, 1:1 at 1080×1080, 4:5 at 1080×1350 and 9:16 at 1080×1920.

  • Padding and window

    Padding of 0, 16, 32 or 64 px, and a macOS, Windows or no window frame, with an optional file name you can edit.

  • 11 code fonts

    JetBrains Mono, Fira Code, Source Code Pro, IBM Plex Mono, Cascadia Code and six more, at 12 to 48 px.

  • Line numbers

    Turn line numbers on or off, and show hidden characters like tabs and spaces.

  • Background

    A pattern behind the frame: dots, grid, lines or glow.

  • Background image Pro

    Upload a PNG, JPEG or WebP up to 8 MB to sit behind the code.

  • Social handle

    Add your X, GitHub, LinkedIn, Instagram or YouTube handle at the bottom left, and a small snipsco.com label at the bottom right if you want one.

Export and share

  • PNG at 1x

    Download or copy a PNG at the size you picked.

  • PNG at 2x Pro

    Twice the pixels, for sharp images on large screens and in print.

  • Share

    Send the image to an app through your device's share menu, where the browser supports it.

  • Publish a link

    Make a public snipsco.com page with the image and the code as text, with an embed code and X and LinkedIn links.

  • Unlisted links Pro

    Publish a page that only people with the link see. It stays off your profile and out of search.

  • Make a video

    The Code to video link under the tool opens the same code and style there to animate it.

Projects

  • Saved projects

    Signed in, a project saves your code, theme, marked lines and file name as you work.

  • Saved frames

    Save the current frame in a project and open it again later.

  • Settings remembered

    Your look and background settings stay as you left them next time.

How to turn code into an image

  1. 01

    Paste your code

    Paste a snippet and pick its language. Pasted code is formatted for you.

  2. 02

    Style it

    Choose a theme, a size (16:9, 1:1, 4:5, or 9:16), padding, and a window. Click a line number to highlight, add, or remove a line.

  3. 03

    Export

    Download or copy the PNG, or publish it to a link you can share or embed.

Where code images work well

  • READMEs and docs, where a picture of code reads the same everywhere.
  • Slides and talks, at 16:9.
  • Posts on X and LinkedIn, at 1:1 or 4:5.
  • Stories and short videos, at 9:16.

Need it moving? Code to video types the same code out as an MP4.

FAQ

Questions