Free tools / Code to image
Turn a code snippet into an image for 𝕏
Paste a snippet, pick a theme and a size, and download a PNG to attach to your post. Keywords, strings, numbers and comments are coloured, and the text is made as large as the image allows.
Updated
Everything runs in your browser. What you paste is not sent to Crux or anyone else, and nothing is saved.
How it works
An image keeps a snippet's monospace font, indentation and colours exactly as you set them. This tool draws your snippet on a canvas in your browser, in a plain window with an optional file name, and saves it as a PNG of 1600 × 900 or 1200 × 675 pixels, both 16:9. It removes the indent every line shares, turns tabs into four spaces, and picks the largest font at which every line fits. When a snippet is too long to stay readable, it says how many lines it left out instead of shrinking the text to nothing.
Questions
Which languages does it colour?
Any, in a simple way. It knows keywords shared by the common languages, strings, numbers and comments that start with //, # or /*. It does not parse your language, so it never refuses a snippet; it just colours less of an unusual one.
Which size should I pick?
Both are 16:9. 1600 × 900 keeps small text sharper; 1200 × 675 makes a smaller file. The layout is the same in both.
What happens to a long snippet?
The font shrinks until every line fits, down to a size that stays readable. Past that, long lines end in an ellipsis and rows at the bottom are left out, and the page tells you how many.
Is my code uploaded anywhere?
No. The image is drawn and saved by your browser. Your code is not sent to Crux or anyone else.
From one post to every push
Crux (cruxpost.com) watches the GitHub repos you choose. Each push, merged pull request or release becomes three drafts in your voice, checked the way this site’s tools check a post, and your coding agent can add why a change matters through the Crux plugin for Claude Code and Codex. Crux reads commit messages, pull request and release text and the names of changed files, never a diff. Post on X copies the draft you like and opens X with it, for you to post; on Autopilot, Crux posts only what you schedule. It reads each post at 1 hour, 24 hours and 7 days, and learns which kinds of post work for your account only once a pattern beats chance.
More free tools
- 𝕏 post preview and character counter: Counts characters the way 𝕏 does (links 23, emoji 2) and previews the post.
- Commit to tweet: Three post drafts from one commit message, with fixed templates and no AI.
- Changelog formatter: Groups pasted commit lines into Added, Fixed, Changed and Removed; Markdown, text or an 𝕏 post.
- Post ideas from a GitHub repo: Reads a public repo's release, commits and stars and suggests posts, each with its source.
- AI slop checker: Flags stock phrases, invented figures and links, length and long sentences in a draft.
- Thread splitter: Splits long text into posts that each fit 280 characters, cutting at sentences.
- Screenshot beautifier: Padding, a background and a plain frame around a screenshot, saved as a PNG.
- 𝕏 header maker for builders: A 1500 × 500 profile header with your project, a currently building line and stack chips.
- Shipping streak card: The days a GitHub account shipped in the last 30, as a card: current streak, longest run, days shipped.
- Best time to post on 𝕏: Your readers' morning, lunch and evening, put on your clock. A guess, and it says so.
- 𝕏 engagement rate calculator: Interactions over impressions and over followers, for one post.
- Launch-day post templates: Fill-in posts for a launch, a Product Hunt day, a release and a milestone, with copy buttons.
- Milestone card generator: A plain PNG of your own MRR, users or stars, with the change since an earlier value.
- 𝕏 card validator: Reads a page's card and Open Graph tags and gives a tag to paste for each one missing.
- 𝕏 video spec checker: Checks a video's size, length, dimensions, aspect ratio and bitrate against 𝕏's limits, in the browser.
- 𝕏 advanced search builder: Turns plain fields or a preset into an 𝕏 search query and an x.com link.
- Reach linter: Flags a link in the main post, extra hashtags, engagement bait and AI-sounding phrases, with sources.