Benchgen

Design2Code — Results

RankModelScore
1gpt-4o90.4
2claude-3-opus87
3gpt-4v86.9
4gemini-pro84.4

Design2Code

1 phaseActive

484 real-world webpages testing screenshot-to-code generation, scored with automatic visual/text metrics and human pairwise evaluation.

Overview

Design2Code

Category Metric Tasks Saturation Created

Paper GitHub

Quick answer: Design2Code is the first real-world benchmark for automated front-end engineering, testing whether multimodal LLMs can convert a webpage screenshot directly into working HTML/CSS code that renders back into a visually faithful reproduction of the original design.

At a Glance

What it tests: Screenshot-to-code generation across 484 manually curated real-world webpages, scored on fine-grained visual and textual fidelity between the rendered output and the original design.

Why it matters: Multimodal LLMs converting visual designs directly into code implementations represents a new paradigm for front-end development; Design2Code provides the first rigorous, real-world testbed (rather than synthetic or toy webpages) to measure how close current models are to automating this workflow.

Known limitations: Automatic metrics (block-match, text, position, color, CLIP similarity) are complemented by human pairwise evaluation because no single automatic metric fully captures perceptual and functional webpage fidelity; the benchmark and its harder Design2Code-HARD variant are also restricted to research-only use.

What Design2Code Measures

Design2Code manually curates 484 diverse real-world webpages as test cases, evaluating how well current multimodal LLMs can generate code implementations that, when rendered, visually match the given reference webpage screenshots. A companion Design2Code-HARD set adds 80 extra-difficult test cases collected from GitHub Pages, specifically chosen to challenge state-of-the-art VLMs' web UI generation capabilities further.

The authors develop a suite of automatic evaluation metrics — including block-match, text-content match, spatial-position match, color match, and CLIP-based visual similarity — to assess how faithfully the generated code renders back into the original design, and complement these automatic metrics with comprehensive human pairwise evaluations to validate the resulting performance ranking. Testing frontier models like GPT-4o, GPT-4V, Gemini, and Claude across multiple prompting strategies (direct, text-augmented, and self-revision prompting), the fine-grained metric breakdown showed models mostly struggled with recalling visual elements from the input webpages and generating correct overall layout designs.

The authors also release Design2Code-18B, a finetuned open-source model based on CogAgent, along with all model predictions to support further analysis by the research community.

Benchmark Specifications

FieldValue
Task categoryCoding (multimodal screenshot-to-code generation)
MetricBlock-Match, Text, Position, Color, and CLIP similarity scores, plus human pairwise comparison
Number of tasks484 real-world webpages (plus 80 in the harder Design2Code-HARD set)
SaturationMedium — frontier models handle simple layouts reasonably well but struggle with visual element recall and complex layout fidelity
Created byChenglei Si, Yanzhe Zhang, Ryan Li, Zhengyuan Yang, Ruibo Liu, Diyi Yang
Source paperSi et al. 2024 (NAACL 2025)
CodeGitHub
DatasetHugging Face

How Design2Code Is Scored

Each generated webpage is rendered and automatically compared against the reference screenshot across five metrics (block-match, text, position, color, and CLIP visual similarity), each scored between 0 and 1, then averaged across the test set. Human pairwise evaluation (reference vs. generated) is used to validate that the automatic metrics correlate with genuine human quality judgments.

State-of-the-Art Results

Scores vary substantially by prompting strategy (direct, text-augmented, self-revision) and model. See the project page for current standings across GPT-4o, Gemini, Claude, and open-source baselines.

Design2Code on Benchgen

No Benchgen results yet — be the first to run Design2Code.

Design2Code vs Other Benchmarks

BenchmarkWhat it testsTasksSaturation
Design2CodeScreenshot-to-code webpage generation fidelity484medium
MM-Mind2WebMultimodal web-agent action grounding2,022low
MMSearchMultimodal AI search-engine reasoning300low

Design2Code focuses on generating front-end code from a static design, complementing MM-Mind2Web's focus on taking actions within an existing live webpage.

Run Design2Code on Your Model

Benchgen lets teams run their own multimodal coding models against the Design2Code suite on demand, tracking visual-fidelity metrics (block-match, text, position, color, CLIP similarity) over time to catch regressions in screenshot-to-code generation quality.

Explore related coding and agent benchmarks like MM-Mind2Web and MMSearch to compare front-end code generation with web-agent action-taking and search reasoning.

Frequently Asked Questions

What is Design2Code? Design2Code is the first real-world benchmark for automated front-end engineering, testing whether multimodal LLMs can convert 484 webpage screenshots directly into working HTML/CSS code that visually matches the original design.
What does a good Design2Code score look like? The paper found models mostly lag on recalling visual elements and generating correct layouts, so strong performance shows up as consistently high scores across all five metrics (block-match, text, position, color, CLIP), not just high scores on one dimension like text content.
Who created Design2Code? Design2Code was created by Chenglei Si and collaborators at the Stanford NLP SALT lab, accepted at NAACL 2025.