Image to Code: turn a screenshot into React Native, Flutter or SwiftUI
CodeTea converts a screenshot or UI mockup into an editable screen and exports it as code for React Native, Flutter, SwiftUI, Jetpack Compose, Android XML or the web. Upload a PNG or JPG, choose a framework, refine the layout in the visual editor, then export the project.
Free trial credits included. One image uses one credit.
How to convert an image to code
- Step 1
Upload a screenshot
Open the CodeTea workspace, choose Image to Code and drop in a PNG or JPG of the screen. Large images are compressed automatically (up to 2 MB, 2048 px on the longest side).
- Step 2
Set the viewport and framework
Enter the width the screen was designed for, between 200 and 1920 px (for example 390 for a phone or 1440 for a desktop page), then pick the framework you want to export.
- Step 3
Refine the layout
CodeTea rebuilds the image as an editable screen in the workspace. Adjust spacing, text and components in the visual editor and preview the result before exporting.
- Step 4
Export the code
Open Export Source Code to view the generated project, copy files into your repo or download the full source for your chosen framework.
Supported frameworks
The same screenshot can be exported to any of these targets. Pick one per conversion.
- React Native
- Flutter
- SwiftUI
- Android XML
- Jetpack Compose
- SwiftUI + Android XML
- React
- Vue
- Angular
- Svelte
- HTML/CSS
When to use Image to Code
- Rebuilding a legacy screen when the original design file is lost and only the running app or a screenshot is left.
- Starting from a mockup exported as an image from a design tool, a whiteboard photo cleaned up into a mockup, or a generated UI.
- Prototyping fast when you want a working layout to iterate on instead of hand-writing every container.
Clean, high-contrast screenshots at their real size give the best layout. If you have the design in Figma or Google Stitch, importing it directly keeps exact spacing and layer names; see the Figma to React Native guide. Want an editable Figma design instead of code? Use the Image to Figma plugin.
Frequently asked questions
What image formats can I convert to code?
PNG, JPG and JPEG screenshots or mockups. Files larger than 2 MB, or wider or taller than 2048 px, are compressed in the browser before upload.
Which frameworks does Image to Code support?
React Native, Flutter, SwiftUI, Android XML, Jetpack Compose, SwiftUI + Android XML, React, Vue, Angular, Svelte and HTML/CSS. You choose the framework before the conversion and can create another project from the same image for a different target.
Is the code from a screenshot production-ready?
It is a starting point you can build on. The image becomes an editable layout in the CodeTea workspace, so you fix anything the conversion got wrong in the visual editor, then export with the same code generators used for Figma imports.
How many screens can I convert at once?
One image becomes one screen. Convert each screenshot separately and add the screens to the same project.
How much does Image to Code cost?
Each conversion uses one credit. Every account starts with free trial credits, and VIP plans add more; see the pricing page for current limits.