Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Web & CSS

Srcset Inspector

Paste the value of an <img> srcset attribute (optionally with its sizes attribute) and see exactly what it means. Each candidate URL is listed with its declared descriptor — a width like 480w or a density like 2x — and its computed effective density: for width descriptors that is the declared width divided by the source size, exactly as the browser derives it. The tool validates against the WHATWG HTML parsing rules and flags the authoring errors that break responsive images: a candidate carrying both a width and a density descriptor, a width of zero or a non-integer width, a density that is not a positive number, an unknown descriptor, an empty srcset, and more. A sizes attribute (media condition pairs such as "(min-width: 800px) 400px, 100vw") is resolved against a viewport width you supply so the computed source size is correct, and the density is then used to show which candidate the browser would select for the chosen device-pixel-ratio. Everything is parsed on-device.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Drop a file here, or browse

Accepts: */*

Files stay on your device.

Ctrl+V to paste an image

    Try:

    Text is processed on this device. If a file is selected, the file is used instead.

    Options

    Drop a file above to begin

    Your file are processed on this device and never uploaded.

    How it works

    What it does

    Paste the value of an img srcset attribute — and optionally its sizes attribute — and the inspector parses it by the WHATWG HTML algorithms. Every candidate is listed with its URL: its declared descriptor, a width in w or a density in x, and the effective density a browser would assign it; width descriptors are divided by the resolved source size, which is how a browser turns a w into its density. A view selector shows the selected source instead: no candidates, just the one the browser would download at the chosen viewport: DPR.

    How the source size is resolved

    When candidates use width descriptors, an sizes attribute tells the browser how wide the image slot will be on the page — a comma-separated list of media conditions and CSS lengths, usually ending in a bare default. The first media condition that matches wins. If the element has no sizes attribute the built-in default is 100vw, the full viewport width. The inspector evaluates the same conditions it can parse and warns on anything it does not understand, so the density it prints is never silently guessed.

    What counts as an error

    A single candidate may carry a w or an x descriptor, never both. One srcset cannot mix width candidates with density candidates. Widths must be positive integers, and densities positive numbers. A trailing comma on a candidate, a URL containing a comma without quotes, and an empty srcset are all malformed. Warnings are reserved for cases the browser tolerates, like duplicated widths where the last candidate wins.

    When it disagrees with the browser

    Two inputs make the browser choose differently: the network, which may pick a larger or smaller candidate through its density selection, and the actual layout width of the slot, which depends on the CSS around the element. The inspector models the stylesheet contract (sizes and the viewport) rather than a particular render, so use it to catch authoring mistakes, not to predict a pixel-exact download on every device.

    Questions

    Why does a 2x candidate have density 2 if I wrote a width?

    A browser cannot use a width descriptor directly. It divides the declared width by the source size that sizes resolves to, which yields an effective density. That density, not the width in w, is what leads selection, so the inspector prints it.

    What is the default source size?

    One viewport. If sizes is missing, or has only media conditions that do not match, the source size is 100vw. That is why 800w with no sizes is roughly 0.625x on a 1280px viewport — it describes the slot, not the image.

    Will the browser always download the selected candidate?

    Not necessarily. The network is allowed to re-pick, and cache, preload and round-page behaviour override this sometimes. The inspector is a model of the markup at the given options, so use it to validate the contract you wrote, not to predict bytes on the wire.

    Why does a density candidate leave the Width column empty?

    A density descriptor fixes no delivered-pixel width. Width is a property of width descriptors; for density candidates the browser uses the CSS size the slot resolves to and the descriptor is used as the pixel ratio. The tool keeps the two columns distinct for that reason.

    See category