# Code to Image — Free Code Screenshot Generator

> Paste a snippet, add a title, a file name and the language, download a PNG sized for social posts. Line numbers, light highlighting, indentation kept — no screenshot cropping.

Page: https://shareglint.com/en/tools/code-to-image

## How it works

1. Paste up to 16 lines of code; indentation and blank lines are kept, tabs become two spaces.
2. Add a title, the file name, the language and your handle.
3. Chrome renders it at 1200×630 or 1080×1080 as a PNG.

## Code images from your docs pipeline

Render a card for every snippet in your docs or changelog: one API call each with the code-snippet template — or design your own in HTML and CSS. 100 images a month free. https://shareglint.com/en/html-to-image

## Questions

### Is the code syntax-highlighted?

Lightly: comments, strings, numbers and keywords common to popular languages get their own colours, with line numbers. It is a pattern match, not a parser for your language, so unusual syntax stays plain.

### How much code fits?

Up to 16 lines (and 1,500 characters); lines after the 16th are left out. The text shrinks to fit and long lines wrap.

### Is it free?

Yes, with no account: 5 images an hour from one address, with a small watermark.

### Can I generate these automatically?

Yes — send the code to the API with the code-snippet template, or save your own HTML and CSS design. 100 images a month free.
