Screenshot to working UI with Claude: turn a sketch or whiteboard photo into a web page

Take a photo of a whiteboard, a paper sketch or a screenshot you like, give it to Claude, and get a working web page with real buttons and forms. Then compare a screenshot with your sketch and fix the differences.

  • Level Beginner
  • Time 30-45 minutes
  • Works with
    • Claude Code
    • Claude Desktop
    • Claude.ai
On this page11 sections

You drew a page on a whiteboard in a meeting. Or you sketched an app screen on paper. Or you saw a layout you like and took a screenshot. This guide turns that picture into a real web page: buttons you can click, a form that responds, and a layout that also works on a phone. Then you compare the result with your sketch and have Claude fix what’s off.

We tested this with Claude Code on a made-up hand-drawn sketch of a bike repair clinic page (header, hero, three cards, a booking form, notes in red). One prompt produced a single index.html in about 30 seconds. We opened it in a real browser at laptop and phone size: the layout matched the sketch, the page didn’t scroll sideways on the phone, and the form showed the “thanks” message from the sketch’s note. Two things were off (the headline touched the header, and the photo placeholder was too big), and the second prompt in step 5 fixed both.

What you’ll have at the end

  • A working index.html built from your picture. It’s one file, so you can open it by double-clicking.
  • Real page parts (header, navigation, sections, form, footer) instead of a flat image of a page.
  • A list from Claude of every guess it made, so you know what to check.
  • A simple “compare and fix” loop you can repeat until it looks right.

What you need (and cost)

ItemDetails
A pictureA photo or screenshot in JPEG, PNG, GIF or WebP. Anthropic’s upload guide suggests images of 1000 x 1000 pixels or larger, and allows up to 8000 x 8000.
Claude Code (recommended)In a terminal or the Code tab of Claude Desktop. Needs a Pro, Max, Ultra, Team, Enterprise or Console account. The free plan doesn’t include Claude Code.
Or claude.aiAny plan, including Free, can upload images and make artifacts. Artifacts need Code execution and file creation (called Create and edit files in the newer Settings layout) turned on in Settings > Capabilities. On Team and Enterprise, an Owner controls this.
A web browserTo look at the result.

Cost: this uses your Claude plan’s normal usage. Nothing else is paid.

Step 1: Take a picture Claude can read

Claude reads handwriting and boxes well, but a clear picture saves you a round of fixes.

  • Photograph straight on, not at an angle, in good light. Crop out the room around the whiteboard.
  • Write the words you want on the page. “Free Saturday bike repair clinic” gives Claude a real headline. A squiggly line gives it nothing.
  • Use a second color for notes that are instructions, not page text. In our sketch, red notes said “3 cards, same size” and “form shows ‘Thanks! See you Saturday’ after send”. Claude followed both and kept them off the page.
  • Draw a box with an X where a photo goes. That’s the usual sketch sign for “image here”.
  • Check for private details. Whiteboards in meeting rooms often have names, numbers or plans in the corner. Crop them out before you upload.

Using a screenshot of someone else’s website? Use it for layout ideas only. Don’t copy their logo, photos or text.

Step 2: Put the picture in a folder

Make a folder, for example sketch-page, and save your picture in it as sketch.png (or sketch.jpg). Then open Claude Code in that folder:

  • Claude Desktop: click the Code tab, choose a Local environment, then use the folder control to open sketch-page.
  • Terminal: cd sketch-page, then run claude.

Claude Code can also take a picture you drag into its window or paste from the clipboard (Ctrl+V; Alt+V on Windows). A file in the folder is easier, because you can refer to it by name later.

Step 3: Build the page (Claude Code)

Paste this prompt. It’s exactly the one we ran. Change sketch.png if your file has another name.

Look at sketch.png. It is a rough sketch of a web page. Build it as a working page.

1. First, list every element you see in the sketch, top to bottom, and every handwritten note (notes are instructions, not page text). If anything is unclear, write down your best guess and mark it "GUESS".
2. Then create index.html: one self-contained file with inline CSS and JavaScript, no external libraries or fonts. Use real HTML elements (header, nav, main, section, form, label, button, footer). Keep the layout from the sketch on a laptop screen, and stack it into one column on a phone.
3. Replace placeholder boxes (like a crossed-out image) with a neutral placeholder block that has alt text, and use made-up but realistic text where the sketch only names a field (like "address").
4. Make anything interactive in the sketch actually work in the browser, without a server.
5. When done, list what you built, every GUESS you made, and anything from the sketch you left out.

Why each part is there:

  • “List every element first” makes Claude read the whole picture before it writes code, so fewer things go missing.
  • “GUESS” gives you a short checklist. In our run, Claude guessed that “10, 11, 12, 1” in the dropdown meant 10am to 1pm, and that the “Prices” link should point to the cards, because the sketch had no prices section.
  • “Real HTML elements” gives you a page that screen readers and search engines understand. Claude also added visible labels above the form fields on its own, which helps everyone.
  • “Self-contained” means nothing loads from other websites, so the file works anywhere.

Read the GUESS list before you open the page. Each guess you correct now saves a round later.

Step 3b: Build it in a chat instead (any plan)

No Claude Code? In claude.ai or the Claude Desktop chat, click + in the message box, choose Add files or photos, and attach your picture. Paste the same prompt, but change the first line to Look at the image I attached. Claude shows the page as an artifact next to the chat, where you can click through it.

We ran the prompt in Claude Code, not in a chat, so the chat result may differ a little. The steps for attaching images come from Anthropic’s upload guide.

Step 4: Look at it at two sizes

Double-click index.html to open it in your browser. Then check:

  1. Laptop size. Does the layout match your sketch? Are all the parts there, in the right order?
  2. Phone size. Make the browser window narrow, or use Chrome’s device toolbar (open DevTools, then click Toggle device toolbar). Everything should stack into one column, with no sideways scrolling.
  3. Click everything. Buttons, links, the form. Try sending the form empty, then filled in.

Take a screenshot of the page at laptop size and save it in the same folder as shot-desktop.png. You need it for the next step.

Let Claude take the screenshots. If you add Playwright MCP, Claude Code can open the page in a real browser, resize it and save screenshots itself. Its README says it blocks file:// addresses by default, so ask Claude to start a small local web server first (for example with python3 -m http.server). Have Claude click through and test your web app shows the setup.

Step 5: Compare and fix

This is the loop that gets you from “close” to “right”. Paste this prompt. We ran it right after step 3:

Compare sketch.png (what I want) with shot-desktop.png (a screenshot of index.html as it is now). List up to five differences that matter, most visible first. Then fix them in index.html. Don't change anything that already matches.

In our test, Claude found four differences and fixed them: it added space between the header and the headline, put the headline on one line as in the sketch, made the photo placeholder smaller and lined up the form fields with the button. It traced the spacing problem to two CSS rules that canceled each other out. The form still worked afterwards.

Take a new screenshot and run the prompt again until nothing important is left. For small changes, just say what you want: “Make the cards half as tall” works fine.

What can go wrong

  • Claude copies the sketch too literally. After our fix round, the photo placeholder became an outlined box with a big X in it, exactly like the sketch. Say what the sign means: “The crossed box is where a photo of a bike goes. Use a soft grey block until I add the photo.”
  • Handwriting is misread. Check the headline and any numbers word for word. Prices and times are where a misread hurts most.
  • Notes end up on the page. If a note shows up as page text, say: “The red writing is instructions for you. Remove it from the page.”
  • The form doesn’t send anything. It’s a working form in the browser, but it has nowhere to send data. To receive real form entries by email, follow Build an RSVP or booking page and put it online for free.
  • Blurry photo, missing parts. If the “list every element” step skips something, retake the photo closer, or add a line to the prompt: “There is also a footer with an address.”
  • The design looks plain. That’s on purpose: Claude follows your sketch. Make it look modern in Give your website a modern look with Claude.

Make it yours

  • Several screens. Sketch each screen on its own page, name them 1-home.png, 2-booking.png and so on, and ask for one HTML file per screen with links between them.
  • From a design file. If the design already lives in Figma, skip the photo and use Figma to code with Claude. It reads the real sizes and colors instead of guessing from a picture.
  • Into Figma for review. Once the page runs, send it to Figma as editable layers so others can comment on it.
  • A distinct style. In Claude Code, the frontend design skill helps Claude pick a palette and type that fit your subject. Add “use the frontend-design skill” to the step 3 prompt.
  • Your own content. Replace the made-up address and placeholder text with real details, and swap the grey block for your photo: “Use bike.jpg from this folder as the hero photo, with alt text ‘A mechanic fixing a bike wheel’.”

Next steps

Sources

Facts checked against these sources on . Page updated . How we check facts

  1. code.claude.com/docs/en/common-workflows (opens in a new tab)
  2. code.claude.com/docs/en/setup (opens in a new tab)
  3. support.claude.com/en/articles/8241126-upload-files-to-claude (opens in a new tab)
  4. support.claude.com/en/articles/17153992-what-are-artifacts-and-how-do-i-use-them (opens in a new tab)
  5. raw.githubusercontent.com/microsoft/playwright-mcp/main/README.md (opens in a new tab)
  6. developer.chrome.com/docs/devtools/device-mode (opens in a new tab)

Related guides

All guides