Description
Screenshot to Code is an AI-powered tool designed to transform visual designs into functional code. It accepts various inputs, including screenshots, mockups, Figma designs, and even screen recordings of websites in action, converting them into clean, ready-to-use code. The tool supports popular frontend stacks such as HTML with Tailwind CSS, React with Tailwind CSS, Vue with Tailwind CSS, Bootstrap, and Ionic with Tailwind CSS.
Users have two primary ways to interact with Screenshot to Code: by running it locally for customization and contribution, or by using the official hosted application at screenshottocode.com for immediate testing without any local setup. Running the tool locally involves setting up a React/Vite frontend and a FastAPI backend, requiring API keys for AI model providers like OpenAI, Anthropic, and Gemini. Gemini is particularly recommended for its asset extraction capabilities, allowing the reuse of real logos and images from screenshots, while Replicate is crucial for image generation, background removal, and editing functionalities.
The project supports a range of AI models, including Gemini 3 Flash and Gemini 3.1 Pro Preview, GPT-5.5 and GPT-5.4 Mini, and Claude Opus 4.6/4.8. The integration of multiple API keys enhances the accuracy and quality of the generated code by allowing the app to select a stronger mix of models. For those interested in advanced features like screen recording to functional prototype conversion, Gemini is a prerequisite. The project also offers Docker support for easier deployment and execution.
Screenshot to Code aims to streamline the web development workflow by automating the tedious process of translating designs into code. This is particularly beneficial for developers, designers, and teams looking to accelerate prototyping, reduce manual coding effort, and ensure consistency between design and implementation. The project is actively maintained on GitHub, encouraging community contributions and feedback.
Screenshot to Code's Core Features
Converts screenshots and mockups into HTML, Tailwind, React, and Vue code.
Supports screen recordings to generate functional prototypes.
Offers a hosted application for immediate use.
Allows local execution for customization and contribution.
Integrates with multiple AI models including Gemini, GPT, and Claude.
Features AI-powered asset extraction using Gemini.
Supports image generation, background removal, and editing via Replicate.
Provides a React/Vite frontend and FastAPI backend.
Includes optional screenshot preview for visual verification.
Docker support for simplified deployment.
Getting Started with Screenshot to Code
Clone the repository from GitHub.
Install dependencies using Poetry for the backend and Yarn for the frontend.
Configure API keys for AI model providers (OpenAI, Anthropic, Gemini, Replicate) in environment files.
Install necessary browser dependencies like Chromium.
Run the backend server using Poetry.
Run the frontend development server using Yarn.
Access the application via the provided local URL (e.g., http://localhost:5173).
Screenshot to Code's Use Cases
- Rapid Prototyping
- Frontend Development
- Design to Code Conversion
- UI/UX Workflow Acceleration
- Screen Recording to Prototype
- Asset Extraction
- Code Generation Comparison





