Pixel Perfect

Documentation

How Pixel Perfect works.

From an empty project to a diff you can hand over: set up pages and viewports, load the two layers, and compare them panel by panel.

On this page

01

Getting started#

Pixel Perfect lays a screenshot of your site over its Figma design, per page and per viewport, so every pixel that drifts is easy to spot.

The Pixel Perfect app: menu bar on top, the inspector panels on the left, and the canvas showing a product page split between its Figma design and the live site.
The app with the demo project open: inspector panels on the left, the viewport tabs and the canvas on the right.
  • Every comparison has two layers: the Figma export of the design (magenta) and the Site screenshot (cyan). They line up from the top-left corner.
  • Work is organised in projects, each with its pages and viewports. One page holds one pair of layers per viewport.
  • Everything stays in your browser (IndexedDB): no account, nothing stored on a server. Share a project as a ZIP — see Export & share.
  • Want to look around first? Open the live demo: a ready-made project with all layers loaded.
Hosted or self-hosted. The public app and a copy on your own machine (npm run dev, see Self-hosting) do the same things: drag & drop, the Figma API and automatic site captures through the Chrome extension. The source is on GitHub.

02

Projects#

A project is one site under review. It owns its pages and its viewport sizes; nothing is shared between projects.

  1. 01Open File ▸ New project… or press N.
  2. 02Type a name (up to 60 characters) and press Create.
  3. 03The First page dialog opens right after: name the page and, if you have it, its URL. See Pages.

Switch, rename or delete projects from File ▸ Projects… (⇧ P). Deleting a project removes its pages, captures, exports, snapshots and notes. The last project cannot be deleted.

A browser keeps up to 6 projects, each with up to 24 pages. Everything is stored in the browser, and a banner warns you when that storage is nearly full: export the projects you are done with, then delete them to make room.

The New project dialog, with a project name typed in and the Create button.
File ▸ New project…

03

Pages#

A page is one URL of the site. It keeps its own captures, Figma exports, snapshots and notes, for every viewport of the project.

A new project starts with one page. Add more from File ▸ Pages… (P), or from the page switcher in the title bar ▸ Manage pages…. The switcher also jumps between pages and renames the current one.

In the pages gallery every page is a card: click its preview to open it, and edit its fields in place — they save as you type. The New page card comes first.

The gallery has two tabs: Figma, with the page cards, and Claude, which creates pages from a Claude Design export, each with its design already loaded.

The First page dialog with a page name and a capture URL.
The first page of a new project.
The Pages gallery on its Figma tab: the New page card first, then a page card with its preview, capture URL and one Figma frame URL per viewport.
File ▸ Pages… — a card to add a new page, then one card per page. The Claude tab imports a Claude Design export.

Page fields#

Capture URL
The address the site screenshots are taken from (http or https). Optional: leave it empty if you only drop or upload screenshots. Needed by the automatic capture. A site behind a password or a login is captured the way you left it in Chrome: open it there and sign in first.
Figma frame URL
One link per enabled viewport — the Figma frame that viewport is designed in. In Figma, select the frame and choose Copy link to selection (right-click ▸ Copy/Paste as). The link must contain node-id, e.g. figma.com/design/…?node-id=12-34; otherwise the field turns red. These links feed the Figma export.

04

Viewports#

The screen sizes the project is designed for. Every page gets one pair of layers per enabled viewport.

The Viewport settings dialog listing Mobile 375×812, Tablet 768×1024 and Desktop 1440×900, each with a checkbox, width and height fields and a remove button.
Capture ▸ Viewport settings…

Open Capture ▸ Viewport settings… or press ,. Settings belong to the project, so all its pages share them. New projects start with Mobile 375×812 and Desktop 1440×900 enabled, and Tablet 768×1024 available but off.

  • Enable a viewport with its checkbox: only enabled ones get a tab above the canvas and are captured by All.
  • Rename it inline, and set W and H between 200 and 4000 px. The width is what matters: captures are full-page, the height only sets the window.
  • + Add viewport creates one 100 px wider than the widest. × removes one.
  • Widths also decide where uploaded files land.
Removing a viewport (with × or Reset to defaults) deletes its captures and Figma exports on every page of the project, so you are asked to confirm first. The last enabled viewport cannot be disabled or removed. After changing a width, re-capture: an amber note flags captures taken at the old size.

05

Loading images#

Each viewport needs two layers: the design and a screenshot of the site. The design can come from Figma, from Claude Design or from any tool that exports images. Get the layers by hand or let the app fetch them — mix freely, a dropped layer and a fetched one behave the same.

Drag & drop#

A file dragged over the canvas: the left half is outlined in magenta and labelled Figma, the right half in cyan and labelled Site.
While a file hovers the canvas, the half it would land on lights up.
  • Drop an image on the left half of the canvas for the Figma layer, on the right half for the Site layer. It goes to the viewport on screen.
  • Or drop it on a viewport tab above the canvas — left half Figma, right half site — to load a viewport without opening it.
  • The viewport you aim at always wins, whatever the image width. PNG, JPEG, WebP, AVIF, GIF and BMP are accepted.
  • Retina screenshots (1x to 3x) are recognised from their width. The Figma layer is scaled to the screenshot's width, so a 2x export lines up with a 1x screenshot.

Bulk upload#

The upload icons in the Layers panel take several files at once — one for Figma exports (I), one for site screenshots. Each file goes to the viewport whose width it matches at 1x or 2x: a 750 px export lands on Mobile 375, a 2880 px one on Desktop 1440.

The closest width wins; when two files match the same viewport, the last one is kept. To place a file on a viewport regardless of its width, drop it instead.

The Layers panel with the upload buttons of the Figma and Site rows outlined.
The upload buttons in the Layers panel: Figma exports on the first row, site screenshots on the second.

Claude Design and other tools#

The Figma layer is named after Figma, but it takes the design from anywhere: an image exported from Claude Design, Penpot, Sketch, Framer or any other tool works the same once it is dropped or uploaded, and can be saved in snapshots like a Figma export.

A Claude Design file can bring in a whole site at once, pages included:

File ▸ Pages on the Claude tab: a dashed drop zone, lit up while a .zip is dragged over it, with a Choose file button.
File ▸ Pages ▸ Claude — drop the .zip here.
  1. 01In Claude Design, choose Export ▸ All artboards (.png). It saves a .zip with one PNG per artboard, named after the artboard.
  2. 02In Pixel Perfect, open File ▸ Pages… (P), switch to the Claude tab and drop the .zip (or choose it).
  3. 03Check the list of screens it found — untick the ones you do not want — and press Import.
  4. 04Back in the Figma tab, fill in each new page's Capture URL.
The screens found in the export, each ticked, with its viewports (Desktop, Mobile, Tablet) and a New or Updates badge; below, 3 new pages, 23 free of 24, and the Cancel and Import 4 screens buttons.
Before importing: one row per screen, the viewports its images go to, and whether it adds a page or updates one.
  • One page per screen. An artboard title that ends with a viewport name — Home – Desktop, Home – Mobile — puts that image on that viewport, and both land on the same page, Home. A title with no viewport is placed by its width, at 1x or 2x, like a bulk upload.
  • Importing again updates. A screen whose name matches a page already in the project is marked Updates and replaces that page's design on the viewports it brings; new screens are marked New. Save a snapshot first to keep the previous version.
  • The PNGs are stored as compressed WebP, as any dropped image is. A project holds up to 24 pages: when the new screens do not fit, Import stays off until you untick some or delete pages.

Figma export#

With a Figma token and the page's Figma frame URLs, the app renders the frames for you through the Figma API.

  • Capture on the Figma row of the Layers panel (⇧ M) exports the viewport on screen; its ▾ ▸ All viewports exports every viewport that has a link. Both are in the Capture menu too.
  • The scale follows the width: 2x for mobile, 1x from 1440 px, in between for tablet (768 px → 1.75x) — but never below your screen's density, so on a Retina screen every viewport is 2x. The Capture menu shows the scale for each viewport.
  • Frames too big for one render are exported in slices and stitched back together; a warning names any part that could not be split.
Nothing is replaced by accident. Commands that replace a layer need ⇧, and the every-viewport runs (▾ All viewports, Capture menu) have no key at all. When one of them would replace captures or exports already in place, the app asks first — save a snapshot if you want to keep the current Figma version.

Get a Figma token#

  1. 01In Figma, open the account menu (top-left) ▸ Settings ▸ Security.
  2. 02Under Personal access tokens, choose Generate new token, give it a name and the File content: Read-only scope.
  3. 03Copy the token (it starts with figd_ and is shown only once).
  4. 04In Pixel Perfect open Capture ▸ Figma token…, paste it and press Save token. The dialog also opens by itself on your first export.

The token is kept in this browser only and sent with each export, never stored on a server; clearing site data removes it. Figma limits image renders on View and Collab seats — use a Dev or Full seat. More in Figma's help.

The Figma token dialog with instructions and a Personal access token field.
Capture ▸ Figma token…
Self-hosted: set FIGMA_TOKEN on the server and nobody is asked for a token — the menu entry disappears.

Automatic capture (Chrome extension)#

Install the Pixel Perfect Capture extension and the site layer is generated for you: the page's Capture URL is screenshotted full-page, at each viewport's exact width, in your own Chrome and with your session. If you are logged in, past the shop password and done with the cookie banner, so is the capture. No key, no account, nothing sent to a server — and localhost or staging addresses work like any other.

  1. 01Add it from the Chrome Web Store (Chrome, Edge, Brave, Arc) and reload Pixel Perfect: an extension only reaches the pages opened after it was installed.
  2. 02Open the site in Chrome once and get it ready the way a visitor would: log in, enter the password, answer the cookie banner.
  3. 03In Pixel Perfect press Capture on the Site row of the Layers panel (⇧ C) for the viewport on screen, or its ▾ ▸ All viewports / Capture ▸ Capture all enabled viewports for every enabled viewport.
  • The site row's Capture button and its menu are always there. Without the extension they open a dialog with the link to install it; the status bar, bottom right, says which extension version is answering, or no extension.
  • The first capture of a site asks you to allow it, once per site. Allowed sites are listed, and can be removed, in the extension's settings.
  • The page opens in a small window, is captured at each viewport — a real phone layout below 768 px, at the same scale as the Figma export (2x on mobile, 1x from 1440 px, 2x everywhere on a Retina screen) — and the window closes by itself. Chrome shows a “started debugging this browser” bar meanwhile: that is the extension at work; cancelling it stops the capture.
  • Lazy images are loaded before the shot. Cookie banners and pop-ups are hidden from the screenshot, never clicked: your choices on the site stay as they were.
  • A site still behind its password is reported, not captured: open it in Chrome, enter the password, and capture again. The extension never types passwords.
  • While it runs, a progress sheet locks the app so results land on the right page; Stop cancels what is left.
  • From any site, the extension's icon ▸ Open in Pixel Perfect opens the page that compares it — or creates one — and captures it.
The capture progress sheet listing Mobile, Tablet and Desktop as capturing, with a Stop button.
The progress sheet, one row per viewport.
No extension, no problem: screenshots taken any other way can always be dropped or uploaded instead.

06

Panels#

The inspector on the left drives the comparison. Fold a panel by its title bar; the ? at its right end opens its section here. B hides the whole inspector.

Layers#

The two layers of the viewport on screen, one row each, with a status mark: ✓ loaded, ✗ failed (hover it for the reason), – empty, a spinner while working.

Capture and the bin act on the viewport on screen. The ▾ beside each offers This viewport or All viewports: picking one runs it at once. Capturing every viewport asks before replacing layers already in place; deleting every viewport always asks first. The upload icon between them is always in bulk: it takes several files and sends each one to the viewport its width matches.

Figma
Capture (⇧ M) exports the frame from Figma — see Figma export. The upload icon has the shortcut I.
Site
Capture (⇧ C) takes the page through the Chrome extension; without the extension it opens the dialog that installs it.

A button that cannot run says why on hover — usually a missing Capture URL or Figma link, set in Pages.

The Layers panel for Tablet 768×1024: a Figma row and a Site row, each with a Capture button and its ▾ menu, an upload button and a delete button with its ▾ menu.

Align#

Lines the design up with the screenshot and sets how close you look.

Offset Y
Moves the Figma layer up or down over the screenshot, in pixels. Use the field, the ↑10 ↑1 ↓1 ↓10 buttons or the arrow keys (↑ ↓ 1 px, with ⇧ 10 px). Align top resets it to 0, Align bottom lines up the bottom edges — handy when only the header differs in height. The px unit and the canvas readout turn violet at 0.
Zoom
25% to 400%: − / +, the slider, a typed value or the presets. Fit (F) fits the layer's width to the canvas, 100% · 1:1 (0) shows one screen pixel per captured pixel.
Drag
Pan scrolls the canvas when you drag it; Figma (V) drags the Figma layer up and down instead, the quickest way to line up a section.
The offset is not saved with the page: it resets on reload or page switch. To keep it, save a snapshot.
The Align panel: Offset Y field with nudge buttons and Align top / Align bottom, zoom controls with presets, Fit and 100% 1:1, and the Drag switch between Pan and Figma.

View#

Four ways to compare the two layers. Each one catches a different kind of drift; switch with 1–4. The controls below the buttons change with the mode.

Opacity
Overlay only. How solid the Figma layer is, 0–100%, with presets at 0, 50 and 100%.
Blend
Overlay only. normal stacks the layers; difference turns matching pixels black so anything that differs glows.
Sync scroll
Side by side only. Scrolling one column scrolls the other; the Align offset shifts where they lock.
The View panel in Overlay mode: the four mode buttons, an Opacity slider with 0%, 50% and 100% presets, and the Blend select set to difference.
The Split view mode comparing a product page with its design.

Split 1

A divider cuts across both layers: Figma on the left, Site on the right. Drag anywhere on the canvas to move it; whatever does not line up breaks at the seam. Hold Space or ⌥ while dragging to pan.

The Overlay view mode comparing a product page with its design.

Overlay 2

The design sits on top of the screenshot. Lower the opacity to ghost it, or set Blend to difference: identical pixels go black, the drift lights up.

The Tap view mode comparing a product page with its design.

Tap 3

You see the site; press and hold the canvas and Figma takes its place, release and the site is back. Your eye catches whatever jumps.

The Side by side view mode comparing a product page with its design.

Side by side 4

Design and build in two columns, scrolling together. Made for long pages and vertical rhythm. Wide viewports open at 50% zoom.

Overlay mode with difference blending: matching areas are black, the misplaced title, price and description glow.
Overlay with difference blending: the build sets the title larger than the design, which pushes the rating and price down.

To hand the result over, File ▸ Download diff map (E) saves a PNG of the differences: black where the layers match, red where they do not.

Tools#

Guides and a pen, drawn over both layers.

Guides
+ Vertical (G) and + Horizontal (⇧ G) drop a line in the middle of the view. Its handle shows the position in px: drag it, or focus it and use the arrow keys (1 px, ⇧ 10 px). Double-click the handle, press Delete or use Remove to delete it. The colour well recolours the selected guide, or sets the colour of the next.
Pen
Draw (D) to circle or mark what is off; pick a colour and a width (1, 2, 4 or 8 px). Undo (Z) removes the last stroke, Clear all removes every guide and stroke. Switch back to Off to pan and drag again.
Guides and drawings are not saved: a reload or a page switch clears them, and they are not exported. Write findings down in Notes.
The Tools panel: + Vertical and + Horizontal guide buttons with a colour well and a guide count, the Pen switch between Off and Draw with colour and widths 1, 2, 4, 8, and Undo / Clear all.
The canvas with a yellow vertical guide at 456 px, a horizontal guide at 322 px and a red pen ellipse around the price.
Two guides measuring the layout and a pen mark around the price.

History#

Snapshots of the Figma layer, so you can go back to an earlier version of the design — before re-exporting a frame that changed, for instance.

  • Save current export (S) archives the viewport's Figma export together with its Align offset. The site capture is not kept: it is re-shot.
  • Load puts the export and its offset back on its viewport and switches to it. Rename gives it a label; Delete asks for a second click.
  • Snapshots belong to the page, newest first. They survive File ▸ Reset this page…, go away with the page or project, and can travel in an exported ZIP.
The History panel with a Save current export button and two snapshots, for Mobile and Tablet, each with Load, Rename and Delete.

Notes#

Free text for the page on screen: what is off, what to check, what you told the designer. One note per page, shared by all its viewports.

  • Saved automatically as you type — no button.
  • Travels with the project in an exported ZIP, so the person you send it to reads the same findings.
  • Kept by File ▸ Reset this page…; cleared only by emptying the field or by File ▸ Reset everything….
The Notes panel for the Product page with three lines of review notes.

07

Export & share#

Projects live in your browser. To hand one over — to a developer, a designer, another computer — export it as a ZIP.

  • File ▸ Export project as ZIP… packs the project: pages, URLs, notes, viewport settings, captures and Figma exports. Tick Include snapshot history to add the snapshots (bigger file).
  • File ▸ Import project from ZIP… opens it as it was left, as a new project. If a project with the same name is already here, you are asked before it is replaced. A browser holds up to 6 projects of 24 pages each; past that, only the first 24 pages are imported.
  • File ▸ Download diff map (E) saves a PNG of the differences for the viewport on screen, to attach to a ticket.

The file is named <project>.pixel-perfect.zip.

The Export project dialog with the Include snapshot history checkbox and the Export button.
File ▸ Export project as ZIP…
File ▸ Reset this page… clears the page's captures and exports but keeps its notes and snapshots. File ▸ Reset everything… deletes every project and the Figma token from this browser, and asks you to type RESET ALL first. Export what you want to keep.

08

Keyboard shortcuts#

Single keys, plus ⇧ for anything that replaces a layer — off while you type in a field or a dialog is open. In the app, ? shows this list.

File

N
New project
P
Pages
⇧P
Projects
E
Download diff map

Align

Move the Figma layer over the capture

↑
Move Figma up 1px
↓
Move Figma down 1px
⇧↑
Move Figma up 10px
⇧↓
Move Figma down 10px
V
Drag moves the Figma layer

View

1
Split
2
Overlay
3
Tap
4
Side by side
+
Zoom in
−
Zoom out
F
Zoom to fit
0
Actual size
B
Show / hide inspector

Canvas

Mouse gestures on the comparison

Space+ drag
Pan instead of moving the split divider
⌥+ drag
Pan in split mode without holding Space

Tools

G
Add vertical guide
⇧G
Add horizontal guide
D
Pen
Z
Undo last stroke
S
Save the Figma export to History

Selected guide

With a guide focused on the canvas

←↑
Move the guide back
→↓
Move the guide forward
Delete
Remove the guide

Capture

Every viewport at once: Capture menu or Layers panel

⇧C
Capture this viewport
⇧M
Export this viewport's Figma frame
I
Upload Figma exports
,
Viewport settings

Menus & dialogs

←→
Switch menu while one is open
↑↓
Walk the items of an open menu
Esc
Close the menu or dialog
?
Show these shortcuts

⇧ C captures through the Chrome extension; without it, the key opens the dialog that installs it. Capturing or exporting every viewport has no key on purpose: use the Capture menu or ▾ All viewports in the Layers panel.

09

Self-hosting#

Run Pixel Perfect on your own machine or server, and set the Figma token once for everyone.

git clone https://github.com/bitforcesrl/pixel-perfect.git
cd pixel-perfect
npm install
npm run dev   # → http://localhost:7654/app

Optional settings go in a .env file (start from .env.example):

FIGMA_TOKEN
A Figma token for every export; nobody is asked for one. See Get a Figma token.

Leave it unset on a public deployment: each visitor then brings their own. Docker and production builds are covered in the README.

Site captures need nothing on the server: they run in each visitor's Chrome extension. The extension answers pixelperfect.fit and localhost out of the box; for a copy on another address, add it in the extension's settings (right-click its icon ▸ Options).