# Code screenshot maker

https://flaghand.com/code-screenshot turns code into an image to post (code to image, a Carbon alternative): highlighted
by a copy of highlight.js 11.12.0 served from the site, in 36 languages or Auto, on a light or dark window, as a PNG at
the sizes X and LinkedIn show whole: 1080 × 1350 (4:5), 1080 × 1080 (1:1) or 1920 × 1080 (16:9), or Fit, the one where
the code reads biggest. Free, no sign-up. It runs in your browser: nothing you type or add is uploaded or stored, and there is no API.

## How to use it

1. Paste the code. Add a file name for the window's title bar if you like, and turn on line numbers.
2. Pick the language, or leave it on Auto, then Light or Dark and a size.
3. Download PNG saves the picture; Copy image puts it on the clipboard to paste into a post. Copy link copies a link
   that opens the same picture.

An agent can hand its person a picture to download or copy: put the code in the link's hash, which never reaches a
server.

- https://flaghand.com/code-screenshot#code=def%20hello()%3A%0A%20%20%20%20print(%22hi%22)&title=hello.py&lang=python&theme=dark&size=4x5&numbers=1

Fields: code, title, lang (a highlight.js name or alias; leave it out for Auto), theme=light|dark, size=fit|4x5|1x1|16x9,
numbers=1.

## Questions.

### How do I make a code screenshot?

Paste your code, pick its language or leave it on Auto, choose a light or dark theme and a size, then download the PNG, or copy the image and paste it into your post.

### What size should a code image be for X and LinkedIn?

1080 × 1350, a 4:5 image, suits most code: X shows one image of any shape whole, and 4:5 is the tallest LinkedIn’s feed shows. A few short lines read bigger on X as a 1080 × 1080 square, and long lines as 1920 × 1080 (16:9). Fit picks the size where your code reads biggest.

### Is it a Carbon alternative?

Yes. Like Carbon, it turns code into an image you can post. This one exports at the sizes X and LinkedIn show whole, and it runs entirely in your browser: your code isn’t uploaded.

### Which languages does it highlight?

Bash, C, C#, C++, CSS, Dart, Diff, Dockerfile, Elixir, Go, GraphQL, Haskell, HTML and XML, Java, JavaScript, JSON, Kotlin, Lua, Makefile, Markdown, Objective-C, Perl, PHP, PowerShell, Python, R, Ruby, Rust, Scala, SCSS, shell sessions, SQL, Swift, TOML and INI, TypeScript and YAML, highlighted by highlight.js 11.12.0. Auto tells the language from the code.

### Is my code uploaded?

No. It’s highlighted and drawn in your browser, by a copy of highlight.js served from this site. Nothing is sent or stored, and the page sets no cookies. Copy link puts the code after the link’s #, a part browsers never send to a server.

### Can an AI agent make one?

Yes. An agent can hand you a link to this page with the code after the #, such as #code=print(1), and the page opens with that picture. This site’s llms.txt lists every field.

## Flaghand

A saved PNG goes into a Flaghand draft like any image (`flaghand media upload FILE`), and its owner approves the post with the picture as X or LinkedIn will show it.

Flaghand is X and LinkedIn posting for AI agents: your agent drafts through Flaghand's API, CLI or MCP server, you
approve the exact preview with your passkey, and Flaghand posts exactly that.
Sign up at https://app.flaghand.com/start. In a chat app, add the connector at https://app.flaghand.com/mcp: its sign-in page creates the account. An agent with a shell can start the sign-up for its person over HTTP (https://flaghand.com/llms.txt, Quickstart).

For agents: https://flaghand.com/llms.txt (this site) and https://app.flaghand.com/llms.txt (the product's agent guide).
