Image Compare Slider
Sweep between a before and after image with a keyboard-accessible divider, an indicative delta readout and a copy-paste HTML embed.
Image slots
two slots emptyDrop or choose an image
Drop or choose an image
Comparison viewport
divider 50% · verticalLoad a before and after image to compare them
The percentage is an indicative mean RGB delta on 512-pixel thumbnails, not a visual-regression verdict. For pixel-level thresholds and SSIM, use an image diff tool. Both images stay in this tab.
Examples
Retouch review
original.jpg / retouched.jpg · divider 50%One viewport revealing the editSweeping the handle makes small retouching changes obvious without swapping files.
Changelog delta
hero.png / hero.webp · difference onMean delta and changed-pixel percentageNumbers are indicative overlap stats suitable for a changelog, not a pass/fail gate.
Embed in docs
Copy embedHTML with inline CSS and clip-pathThe snippet is self-contained and escapes labels and URLs before interpolation.
About this tool
The Image Compare Slider stacks two images in one viewport and reveals the after image through a draggable divider. The handle is a real ARIA slider: arrow keys step one percent, Shift+arrow ten, Home and End jump to the extremes, and double-click snaps back to 50%. Choose a vertical left/right sweep or a horizontal top/bottom sweep for tall mobile crops.
A toggleable readout computes two indicative numbers from 512-pixel thumbnails: mean RGB delta as a percentage of the 0–255 range, and the share of pixels where any channel differs by more than 16. It is deliberately labeled indicative — a dedicated image diff tool owns thresholds, heat maps and SSIM for actual regression decisions. Mismatched image sizes are aligned top-left with a warning badge, and the readout then covers the overlapping region.
You can swap the pair, zoom both panes together, export the current divider state as a PNG screenshot, and copy a self-contained HTML/CSS snippet that uses clip-path and a tiny pointer handler. All image data remains in your tab; the embed contains object URLs from that session rather than uploaded copies.
What this tool does not do
- The percentage readout is computed on downscaled thumbnails and is not a regression verdict.
- Images of different sizes are aligned top-left; no automatic scaling or registration is performed.
- The embed uses object URLs valid for this browser session, not permanent hosted copies.
- No image editing: cropping, annotation and pixel heat maps belong to other tools.
How to use this tool
Load two images
Choose a Before (A) and After (B) file. Each slot reports its filename, decoded dimensions and byte size.
Sweep the divider
Drag the circular handle, click anywhere in the viewport, or focus the handle and use arrow keys. Double-click snaps to 50%.
Choose options
Switch between vertical and horizontal sweep, set 1×/2×/4× zoom, and toggle the indicative difference readout.
Copy or screenshot
Copy embed gives standalone HTML with inline CSS; Screenshot downloads the current before/after split as a PNG.
Use cases
Portfolio showcases
Let visitors scrub between unedited and finished photographs without hosting a plugin.
Optimization demos
Show a PNG original against a WebP export and quote the byte savings beside the visual comparison.
Bug reports
Attach a single screenshot of the before/after split to a ticket, with the divider at the revealing position.
Controls and behavior
| Control | Effect |
|---|---|
| Vertical sweep | After image is clipped from the left edge to the divider |
| Horizontal sweep | After image is clipped from the top edge to the divider |
| Arrow keys | Move the divider by 1%; Shift+arrow moves by 10% |
| Home / End | Jump to 0% or 100% |
| Double-click | Snap the divider back to 50% |
| Difference readout | Mean RGB delta and share of pixels with any channel Δ > 16, on ≤512px thumbnails |
The clip is applied in viewport space, so the divider stays aligned with the handle even when both panes share a zoom transform.
Frequently asked questions
How do I screenshot the slider at a divider position?
Move the handle to the position you want and click Screenshot. The tool renders both halves plus the clip into a canvas at the larger image's size and downloads a PNG. You can also copy the embed snippet if you want an interactive version on your own page.
Does the embed need JavaScript?
The copied snippet is plain HTML with inline CSS; a tiny inline pointer handler makes the handle draggable. There are no external libraries, stylesheets or hosted assets — only the two image URLs from your current session.
Why does my percentage differ from an image diff tool?
This readout is indicative: it averages RGB deltas over 512-pixel thumbnails and counts a pixel when any channel differs by more than 16. A dedicated image diff tool uses full-resolution deltas, adjustable thresholds, heat maps and SSIM, which are the right tools for a regression verdict.
Can I use images of different sizes?
Yes. Both images are aligned from the top-left corner and a warning badge reports the two dimensions. The readout compares only the overlapping region. For a meaningful visual comparison, supply images captured at the same size.
Are my photos uploaded?
No. Files are decoded in the browser and displayed through local object URLs. Nothing is transmitted or stored, and the object URLs are revoked when the tool unmounts.
Can I use the keyboard to move the divider?
Yes. Focus the handle (it is a real slider control) and press Arrow Left/Right for 1%, Shift+arrow for 10%, Home for 0% and End for 100%. The aria-valuenow and spoken value track the live position.
Related tools
APCA Contrast Calculator
Calculate directional APCA 0.1.9 Lc contrast scores and compare them with WCAG 2.1 ratios.
Barcode Generator
Generate barcodes in 8 formats (CODE128, EAN13, UPC, and more) — configure line width, height, and text display, then download as SVG or PNG.
Base64 Image Encoder
Open the Image workspace in Base64 Toolbox to resize and convert images to Base64 data URIs, then copy HTML, CSS, Markdown or JavaScript snippets.
Batch Image Resizer
Resize multiple images with width, height, percentage or max-dimension rules and renaming, privately.
BlurHash Generator
Encode an image into a compact BlurHash string and verify it with a live decode preview.
CSS Container Queries Lab
Generate CSS container queries and preview responsive component patterns