Looking for screenshot-to-code?
abi/screenshot-to-code is a popular open-source project: you run it yourself with your own OpenAI or Anthropic API key (its author also sells a hosted version). IMG2HTML does the same job as a ready-to-use service: nothing to install, no API key, an editor to fix the result by prompt, and export to Tailwind HTML, React, Vue or Angular. Self-host the open-source repo if you want full control; use IMG2HTML if you want the HTML in 30 seconds from your browser or the Chrome extension.
Taking a screenshot that converts well
The model rebuilds everything in the image, so the cleaner the capture, the less you delete afterwards. The Upload-Post screenshot above was taken at 1280 x 800 after closing the cookie banner; with the banner open, the banner would have been rebuilt too.
- Chrome or Edge: open DevTools (F12), press Ctrl+Shift+P (Cmd+Shift+P on a Mac) and run Capture screenshot for the visible area or Capture node screenshot after selecting one section in the Elements panel. No browser bars, no scaling.
- macOS: Cmd+Shift+4 and drag over the part you want, or press Space to capture one window.
- Windows: Win+Shift+S opens the snipping bar; the capture goes to the clipboard and can be saved from the notification.
Keep the browser at 100% zoom and a normal desktop width (1280 to 1440 pixels). Close cookie banners, chat bubbles and popups first. If a page is long, capture the hero, the feature grid and the footer as separate images.
From screenshot to a working page
- Upload the screenshot. The conversion took 27 seconds for this example.
- Check the preview against the original. In this run the layout, the copy and the curl command were right; the X, Threads and Bluesky icons needed replacing.
- Ask the editor for fixes in plain words, or edit the code. Then swap the placeholders (the avatars and the flag here) for your files.
- Export as Tailwind HTML, or switch to React or Vue if the page is going into an app.
Screenshots of apps and designs
A screenshot does not have to come from a website. Screens of desktop apps, admin panels and email templates convert the same way. For mobile screens and mockups, see image to code; for frames exported from a design tool, see Figma to HTML. All four real examples, side by side, are on the image to HTML converter page.
If you already have the HTML of a page and only want to look at it, the free HTML viewer renders it at phone, tablet and desktop widths.
IMG2HTML and other image to code tools
The tools people compare most often for turning an image or a screenshot into code, and how they differ. Details of other tools are as published on their own sites; check them for current plans.
| Tool | What it is | Output | Price |
|---|
| IMG2HTML | Hosted converter: web app, Chrome extension and API | HTML + Tailwind CSS; inline CSS, React, Vue or Angular from the editor | From $1.99/month for 3 conversions |
|---|
| screenshot-to-code (abi) | Open-source project you run with your own OpenAI, Anthropic or Gemini API key; a paid hosted version also exists | HTML + Tailwind, React, Vue and other stacks | Free code; you pay for the model API |
|---|
| v0 by Vercel | AI app builder that starts from a prompt or an image | React and Next.js with Tailwind and shadcn/ui | Free tier and paid plans |
|---|
| Fronty | Image to HTML/CSS service with a visual editor | HTML and CSS | See fronty.com |
|---|
| Anima | Design to code plugin for Figma | React, HTML and Vue | See animaapp.com |
|---|