Blog

How to check a live page against a Figma mockup for a pixel perfect build

By · · 5 min read

On 24 October I took two community solutions of the same Frontend Mentor challenge, both built from the designer's 1440 px JPG in the challenge files, and compared each live page with that mockup. The first solution differed in 12.4% of its pixels and produced more than 30 mismatches, and when I checked them by eye they were real: a white background instead of a cream one, a larger navigation, a narrower hero heading, a whole section shifted down. The second differed in 1.07%, almost all of it text antialiasing, and its top mismatch was an extra attribution line in the footer that the mockup doesn't have.

That pair is the best test I have for the question this article is about. A careful build and a sloppy one should look clearly different in the report, and a careful build shouldn't drown in noise just because Chrome draws letters slightly differently from Figma.

Why the overlay alone gets tiring

The classic way to check a build is an overlay: put the mockup on top of the page at half opacity and look for edges that don't line up. It works (I still use it to confirm findings), but on a long landing page you end up scrolling, squinting and comparing from memory, and small things like a 4 px gap or a slightly different gray are the first to slip past. PerfectPixel, a popular overlay extension with around 300,000 users, shows 2 layers at a time on its free tier (Chrome Web Store listing, checked on 4 November 2026). That's fine for one screen and limiting when a page has a mockup per breakpoint.

You still make the call yourself, but automatic comparison shows you where to look. Instead of searching the whole page you get a numbered list of places where the build and the mockup disagree, each with a crop from both, and you decide which of them matter. That's the job of the mockup comparison in UI Testing Inspector.

How to export a Figma frame for mockup comparison

Most bad results I've seen came from a width mismatch between the mockup and the window. Export the frame at 1× with the same width as your browser window (a 1440 px frame for a 1440 px window), or select the frame in Figma, use Copy as PNG and paste it into the side panel with Ctrl+V. If the widths differ, the page reflows at another width and the comparison has to scale one of the images. In my tests even 1279 px against 1280 px produced three false clusters. That's why the side panel shows the current window width and offers a button that fits the window to the mockup. Phone frames need extra care, because Chrome won't make a window narrower than about 500 px; I explain why, and how the responsive audit works around it, in the article about testing at 320 px.

A 2× export works too, since the extension recognizes double width, and PNG, JPG and WebP are all accepted. Transparent areas of the mockup (a frame exported without a background fill, for example) aren't compared at all, because blending them with white would mark a dark page as almost entirely different.

How the mockup comparison works

The extension captures the page (the visible part or the full page, your choice), then compares it with the mockup at the smaller of the two resolutions. That detail matters on laptops with display scaling. Upscaling a 1× mockup to match a screenshot taken at 125% produced about 40 false mismatches on a page that matched the design exactly, so both images are scaled down instead. Ads, carousels and timers are masked the same way as in a regular baseline comparison.

Differences are grouped into clusters, and clusters that look like the same text drawn with slightly different antialiasing go to a separate list of rendering differences, so they don't push real findings out of the report. Each mismatch gets a number, and the same number appears as a frame on the screenshot. There are four views to switch between: Overlay with an opacity slider, Slider (drag a divider between mockup and page), Toggle (the two images alternate twice a second) and Differences only, which paints every differing pixel.

What pixel perfect should mean

A literal zero is impossible, since Figma and Chrome rasterize text with different engines, and a font that renders a fraction of a pixel heavier in the browser will light up every letter in the Differences only view. I treat pixel perfect as "positions, sizes, spacing and colors match, and only text rendering differs". On the Frontend Mentor pair that line separated the two builds clearly (1.07% against 12.4%), but I don't know yet where the threshold for "close enough" should sit on other designs. For now the extension shows the percentage and the list of mismatches and lets you decide, which I suspect is the right default anyway.

Known limits

If a paragraph has completely different words but the same line shapes (a testimonial carousel stopped on another slide, for example), the comparison can file it under rendering differences. If you compare against the wrong tab, you'll get a warning that the page doesn't look like the mockup, though very short screens can still slip through. In full-page mode sticky headers are unstuck so they appear once at the top, as they do in a mockup, and wide fixed bars along the top or bottom edge (a cookie banner, a bottom call-to-action bar) are hidden on the frames where they don't belong, but taller popups and narrow floating widgets stay in the screenshot. And the mockup has to be a flat image, since there's no connection to the Figma API (the upside is that the file stays on your computer).

Links: exporting from Figma · Frontend Mentor challenges · UI Testing Inspector FAQ · UI Testing Inspector in the Chrome Web Store

P.S. Frontend Mentor's license doesn't allow redistributing the design files, so I can't publish the pair itself, but any challenge with a 1440 px desktop design will let you repeat the experiment on your own build.

Ana Do builds UI Testing Inspector and writes about checking layouts and measuring how reliable AI systems are. More writing and research at anaexplores.github.io.