Open Source Alternatives LogoOpen Source Alternatives
AlternativesBlogAdvertise
Open Source Alternatives LogoOpen Source Alternatives

Stay Updated

Subscribe to our newsletter for the latest news and updates about Alternatives

Open Source Alternatives LogoOpen Source Alternatives

Handpicked Open Source Alternatives to Paid Softwares

Product
  • Categories
  • Tag
  • Sign In
Resources
  • Blog
  • Collection
  • Submit
  • Advertise your tool
Company
  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Sitemap
Copyright © 2026 All Rights Reserved.
Home/Categories/Web Development/screenshot-to-code
icon of screenshot-to-code

screenshot-to-code

Open source alternative to Google Stitch, Locofy.ai, Builder.io, Banani AI and Alloy

Convert screenshots, mockups, and Figma designs into working HTML, React, Vue, or Bootstrap code using AI with no manual coding required.

74.2K starsPythonMITActive this week
Visit websiteGitHub repo
image of screenshot-to-code
Contents
  1. 01Who screenshot-to-code is for
  2. 02The problem it solves
  3. 03How it solves it
  4. 04Strengths and trade-offs
  5. 05screenshot-to-code vs alternatives
  6. 06Install and self-host
  7. 07Tech stack
  8. 08FAQ
  9. 09Similar open-source tools
TL;DR

screenshot-to-code is an open source tool that converts screenshots, Figma exports, and screen recordings into working frontend code using AI. It replaces paid design-to-code platforms like Locofy.ai and Builder.io, generating HTML, React, Vue, or Bootstrap output with no per-export fees. MIT licensed and self-hostable via Docker Compose, it is best suited for frontend developers and designers who prototype regularly and need to skip the boilerplate phase.MIT · Python · 74.2K stars · Active this week

who it's for

Who screenshot-to-code is for#

Frontend developers prototyping from design mockups

Drop in a Figma export or design screenshot and generate a working React or HTML scaffold in seconds. The output gives you the layout structure, Tailwind classes, and component hierarchy to refine, instead of writing it from scratch.

Skip if:

Skip if your designs rely heavily on complex animation states that static screenshots cannot represent. The tool works best on relatively clean, static layout compositions.

Indie developers building MVPs from reference designs

Convert a reference website screenshot or a rough wireframe into a starting HTML and Tailwind layout. For developers who are not designers, this collapses the gap between wanting a layout and having a working starting point.

Skip if:

Skip if you need production-ready accessible components with full ARIA attributes. The generated code is a structural scaffold, not a finished accessibility-reviewed component.

Designers converting Figma exports to component code

Export a frame from Figma and generate React and Tailwind code a developer can copy into a component file. Asset extraction with a Gemini API key pulls real images from the frame rather than substituting placeholders.

Skip if:

Skip if your Figma designs rely on auto-layout breakpoints or component variants that need design-system-aware generation. The tool reads the visual output, not the Figma layer structure.

Teams capturing reference UI patterns from live sites

Record a screen capture of a target website in action and generate a functional prototype. This is faster than reading the site's source HTML, especially when JavaScript-rendered content makes the DOM messy.

Skip if:

Skip if the site uses heavy animation frameworks with complex keyframe sequences. The generated code captures the static layout structure, not animation timing or motion choreography.

the problem

The problem it solves#

Translating a visual design into clean frontend code is a labor-intensive step that stalls prototyping. A designer hands off a Figma file or a screenshot, and the developer spends hours recreating margins, font weights, layout logic, and component hierarchy by hand. For teams iterating quickly on MVPs or redesigns, this handoff gap is one of the most reliable time sinks.

The alternatives are unattractive: manually copying CSS values from Inspect mode, paying for proprietary design-to-code subscriptions with per-seat or per-export pricing, or maintaining fragile design-token pipelines that break every time the design system changes. Screen recordings of interactive sites are even harder to translate, since capturing animation and state transitions manually requires significant extra effort on top of the static layout work.

how screenshot-to-code solves it

How it solves it#

Multi-stack code generation

Outputs code in six stacks: HTML with Tailwind, HTML with CSS, React with Tailwind, Vue with Tailwind, Bootstrap, and Ionic with Tailwind. Choosing React and Tailwind is the most common path for teams that want output they can copy directly into a component library.

Multi-provider AI model support

Works with OpenAI (GPT-5.5, GPT-5.4 Mini), Anthropic (Claude Opus 4.6, 4.8), and Gemini (3 Flash, 3.1 Pro). Adding multiple API keys lets the app automatically pick the strongest model mix per generation; single-key setups use that provider's models only.

Asset extraction from screenshots

When a Gemini API key is supplied, the tool extracts real logos, images, and icons directly from the screenshot rather than substituting placeholders. This produces code that references the actual assets, cutting the gap between generated output and the finished design.

Screen recording to prototype conversion

Accepts video screen recordings of live websites and converts them into functional prototypes. Useful for replicating a reference site's layout and interactions without accessing its source code. Requires a Gemini API key.

Screenshot preview with AI self-verification

An optional Chromium-based preview mode renders the generated page in a headless browser and lets the AI model visually inspect its own output. Enabled automatically when Playwright installs Chromium, or included by default in the Docker image.

Image editing and background removal

When a Replicate API key is supplied, the tool adds image editing and background removal capabilities. Generated pages can reference edited or cleaned-up asset versions, reducing manual post-processing after code generation.

strengths · trade-offs

Strengths and trade-offs#

Strengths

  • MIT license with no usage restrictionsMIT-licensed on GitHub, with no restrictions on commercial use, forking, or modification. Unlike proprietary design-to-code tools that charge per export or per seat, the self-hosted version costs only the AI API calls you make.
  • Choice of three AI provider familiesMost design-to-code tools lock you to a single model. screenshot-to-code supports OpenAI, Anthropic, and Gemini simultaneously, letting you compare output across providers and fall back to an alternative when any one API is unavailable.
  • Runs entirely on your own infrastructureThe backend is a standard FastAPI Python service and the frontend is a Vite/React app. Both run on any server with Docker Compose, keeping your screenshots and generated code off third-party infrastructure. This matters for client NDAs or regulated industries.
  • Accepts screen recordings as inputBeyond static screenshots and image exports, the tool accepts video recordings of live websites. Paid alternatives in this category generally support static images only, making screenshot-to-code a better fit for capturing interactive flows.

Trade-offs

  • -Requires external AI API keys to functionscreenshot-to-code does not bundle an AI model. You must supply at least one API key from OpenAI, Anthropic, or Google, meaning generation costs are usage-based and accumulate with volume. There is no fully offline or local-model path with reliable quality; the README notes that Ollama-based setups produce poor results.
  • -Multi-service self-hosting setupRunning locally means standing up a FastAPI backend (with Poetry and optional Playwright and Chromium) plus a separate Vite frontend. This is a moderate-complexity deployment. Docker Compose simplifies it, but production setups still require managing environment variables and multiple API keys.
  • -Output quality depends on input and model choiceFidelity depends heavily on screenshot clarity and the AI model used. Complex or dense layouts, small text, or low-resolution inputs produce lower-quality code that needs manual correction. The README recommends Gemini specifically for the best screenshot-to-code accuracy.
versus alternatives

screenshot-to-code vs alternatives#

screenshot-to-code vs Locofy.ai

Locofy.ai is a paid AI design-to-code tool that integrates directly with Figma and converts designs into React, Gatsby, or Next.js code. It is a proprietary service with a subscription model; there is no self-hosted option.

Featurescreenshot-to-codeLocofy.ai
LicenseMITProprietary
Self-hostingYes (Docker Compose)No
Input typesScreenshots, Figma exports, video recordingsFigma plugin integration
AI modelsOpenAI, Anthropic, Gemini (your keys)Proprietary model
Output stacksHTML, React, Vue, Bootstrap, Ionic (Tailwind options)React, Gatsby, Next.js
PricingFree self-hosted; AI API costs onlySubscription

screenshot-to-code is the better pick when you do not use Figma as your primary design tool, when you want to control which AI model generates the code, or when you need to keep designs off third-party servers. Locofy.ai has an advantage for teams working exclusively in Figma who want native plugin integration that reads layer names and component structure, not just the visual output.

screenshot-to-code vs Builder.io

Builder.io is a visual development platform with a design-to-code feature that generates React and Angular code from designs. It is primarily a managed hosting and visual CMS tool; the code export feature is part of a broader paid subscription.

Featurescreenshot-to-codeBuilder.io
LicenseMITProprietary
Self-hostingYesNo
Primary use caseScreenshot or recording to codeVisual CMS with code export
Output stacksHTML, React, Vue, Bootstrap, IonicReact, Angular, Vue
Cost modelFree self-hostedSubscription platform

Builder.io makes sense when you want a full visual CMS and content editing workflow alongside code generation. screenshot-to-code is a better fit when you only need the image-to-code step, without paying for a broader platform you will not use.

install · self-host

Install and self-host#

bash
Self-hosting runs the frontend and backend together using Docker Compose.
```bash
git clone https://github.com/abi/screenshot-to-code.git
docker-compose up -d --build
```
tech stack · detected from GitHub

What it's built on#

Languages
PythonTypeScript
Frameworks
FastAPIReact
frequently asked

FAQ#

Is screenshot-to-code free to use?

The software is MIT licensed and free to run on your own server. You do need at least one API key from OpenAI, Anthropic, or Google Gemini, and those providers charge per token. At typical usage, generating code from a screenshot costs a few cents. A hosted version is also available at screenshottocode.com for teams who prefer not to self-host.

Which AI models does screenshot-to-code support?

It supports Gemini 3 Flash Preview and Gemini 3.1 Pro Preview, GPT-5.5 and GPT-5.4 Mini, and Claude Opus 4.6 and Opus 4.8. The README recommends Gemini as the best model for screenshot-to-code accuracy and requires Gemini specifically for asset extraction from screenshots and for the video (screen recording) input mode.

Can I self-host screenshot-to-code?

Yes. The tool has a React/Vite frontend and a FastAPI Python backend. The easiest path is Docker Compose: set your API keys in a .env file and run docker-compose up -d --build. The Docker image includes Chromium for the optional screenshot preview feature. Manual setup uses Poetry for the backend and pnpm for the frontend.

What code output formats does screenshot-to-code support?

It outputs HTML with Tailwind CSS, HTML with plain CSS, React with Tailwind, Vue with Tailwind, Bootstrap, and Ionic with Tailwind. The six stacks cover the most common frontend environments. You select the target stack before generating.

How does screenshot-to-code differ from Locofy.ai or Builder.io?

The primary differences are self-hosting, model choice, and cost model. screenshot-to-code is MIT licensed, runs on your own server, and lets you pick from three AI provider families. Locofy.ai and Builder.io are proprietary SaaS tools with subscription pricing. screenshot-to-code also accepts screen recordings as input, which most paid alternatives do not support.

also worth a look

Similar open-source tools#

TypeUI

TypeUI

CLI tool for managing design systems for Claude and AI tools

1.7KTypeScriptMIT
Puck

Puck

Open source drag-and-drop page editor for any React app

13.1KTypeScriptMIT
material-ui

material-ui

Open source React components for Google's Material Design

98.8KJavaScriptMIT
Optimo

Optimo

Optimize and convert images and videos using open formats

179JavaScriptMIT
Untitled UI React

Untitled UI React

Open source React UI component library with Tailwind CSS

1.9KTypeScriptMIT
21st.dev

21st.dev

Browse and install production-ready shadcn/ui components via CLI

2KTypeScriptMIT

Repository

Stars
74.2K
Forks
9.1K
License
MIT
Last commit
4 days ago
Last verified
Aug 19, 2026
Repo
abi/screenshot-to-code ↗

Additional details

Language
Python
Open issues
127
Contributors
29
First release
2023

Categories

Web DevelopmentDesign & CreativeDeveloper Tools

Tags

UI/UX DesignDeveloper ToolsLow-codeCodingAI Coding Assistant