Recommended Free Tools
Yes—you can make a Firefox bookmarklet that asks for a CSS selector, renders the matching element with html2canvas, and downloads a PNG. The bookmarklet below is self-contained, checks that exactly one element matches, loads html2canvas when needed, and uses your device-pixel ratio for sharper output. It is convenient for quick, repeatable captures, but it reconstructs the element from the DOM rather than taking a native browser screenshot.
What you are building
A bookmarklet is a bookmark whose URL begins with javascript:. When you click it on a page, Firefox executes the JavaScript in the current tab. This version:
- Prompts for a CSS selector.
- Requires exactly one matching element, preventing an accidental first-match capture.
- Loads html2canvas on demand.
- Renders the element at
window.devicePixelRatioand downloadselement-screenshot.png.
html2canvas documents that its output is based on the DOM and “may not be 100% accurate to the real representation”; it builds an image from page information instead of taking an actual screenshot. CSS properties the library does not understand, fonts that have not loaded, animations, and cross-origin assets can therefore produce differences.
Create the bookmarklet
- Show Firefox’s bookmarks toolbar if necessary with Menu → Bookmarks → Bookmarks Toolbar → Always Show.
- Create a new bookmark (right-click the toolbar and choose Add Bookmark…).
- Enter a name such as Screenshot selected element.
- Paste the complete code below into the URL field, then save it.
Some Firefox interfaces remove the javascript: prefix when code is pasted into a bookmark URL. If that happens, type javascript: manually at the beginning and leave the rest of the code unchanged.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
javascript:(async()=>{
const selector=prompt('CSS selector to capture:','#content');
if(!selector)return;
const matches=document.querySelectorAll(selector);
if(matches.length!==1){
alert(matches.length
? `Selector matched ${matches.length} elements. Refine it to match exactly one.`
: 'No element matched: '+selector);
return;
}
const el=matches[0];
if(!window.html2canvas){
await new Promise((resolve,reject)=>{
const s=document.createElement('script');
s.src='https://html2canvas.github.io/html2canvas/dist/html2canvas.min.js';
s.onload=resolve;
s.onerror=()=>reject(new Error('Could not load html2canvas'));
document.head.appendChild(s);
});
}
const canvas=await html2canvas(el,{
scale:window.devicePixelRatio,
useCORS:true
});
const a=document.createElement('a');
a.download='element-screenshot.png';
a.href=canvas.toDataURL('image/png');
a.click();
})().catch(e=>alert('Capture failed: '+e.message));
Keep the code as one bookmark URL; line breaks are normally accepted, but if Firefox rejects them, remove the line breaks and paste the resulting single line. The immediately invoked function expression (IIFE) keeps variables out of the page’s global scope.
Find a selector in Firefox
- Open Menu → More tools → Web Developer Tools, or press F12.
- Select the Inspector tab.
- Click the node-picker icon, then click the element you want.
- In the HTML pane, inspect its
id, classes, attributes, and parent structure.
Prefer stable selectors such as #article, main article, or [data-testid="invoice"]. Classes generated by a framework can change between builds. Test the selector in the Inspector’s console with document.querySelectorAll('your selector').length. The bookmarklet deliberately refuses zero or multiple matches. If you intentionally want one of several repeated cards, add a structural condition rather than silently accepting querySelector‘s first result.
Run it and verify the result
- Navigate to the page and wait until the target content and images finish loading.
- Click the bookmarklet.
- Enter the selector exactly as it appears in the page, then choose OK.
- Firefox downloads the PNG. Open it and compare dimensions, fonts, backgrounds, and images with the source element.
The scale option increases pixel density on Retina and other high-density displays; it does not correct layout differences. useCORS:true asks html2canvas to request images with CORS, but it only works when the image server sends an appropriate permission header.
Why the image can differ from the page
DOM reconstruction, not a native capture
html2canvas reads styles and paints an approximation onto a canvas. It cannot reproduce every browser feature, filter, plugin, video frame, or proprietary rendering detail. Its documentation says it renders only properties it understands.
Cross-origin images and tainted canvases
Images hosted on another origin need same-origin access or CORS support. If a foreign image is drawn without permission, the canvas can become tainted; reading it with toDataURL() may then fail. A CORS flag cannot override the remote server’s policy. Replace the asset, proxy it with permission, or use a browser-level screenshot.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Timing, fonts, and dynamic state
Run the bookmarklet after lazy images and web fonts have loaded. Pause animated components if exact visual comparison matters. A page that changes after the script starts can still produce an inconsistent reconstruction.
Selectors embedded in code
This bookmarklet prompts for the selector, so quotes do not need to be escaped inside the URL. If you generate a bookmarklet with a selector hard-coded in JavaScript, escape quotes and backslashes for the surrounding string.
Firefox’s native alternatives
For a browser-level result, Firefox’s built-in tools are often more faithful. In Inspector’s HTML pane, right-click the target node and choose Screenshot Node; Mozilla documents this command for a single element. Firefox’s screenshot interface can also capture a selected region, an automatically highlighted page part, the visible page, or the full page.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsFirefox’s command-line screenshot documentation defines a --selector option for selecting one element, along with delay and device-pixel-ratio options. That is useful for scripted captures outside an interactive tab.
| Capability | Bookmarklet with html2canvas | Firefox native capture |
|---|---|---|
| Rendering | DOM reconstruction; unsupported CSS can differ | Browser-level pixels, generally closer to what is displayed |
| Selector repeatability | Prompt and reuse any CSS selector | Inspector node command or command-line --selector |
| Cross-origin assets | Requires same-origin access or permitted CORS; tainted canvas can block export | Captured by the browser’s screenshot path |
| Full-page capture | Not provided by this element-focused script | Firefox UI supports full-page screenshots |
| Installation | One bookmark; loads a third-party script | Built into Firefox |
| Output type | Canvas-generated PNG | Native screenshot image |
Use the bookmarklet when you need a quick selector-driven workflow on ordinary DOM content. Choose native capture when pixel fidelity, cross-origin media, full-page output, or browser UI state matters more.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Common failures and fixes
“No element matched”
The selector is invalid for the current page, the element is inside an iframe, or the page has not rendered it yet. Check the selector in the Inspector console, wait for the component, and inspect the correct frame. A top-page script cannot query a cross-origin iframe’s DOM.
“Selector matched multiple elements”
Make the selector more specific: add an ID, a parent relationship, an attribute, or an :nth-of-type() condition. Avoid relying on an arbitrary first match.
Free tools Windows power users keep installed
One-click scans. No signup required.
“Could not load html2canvas”
The script host was unreachable, blocked by the page’s Content Security Policy, or interrupted by a network extension. Retry on a normal page, check the Browser Console for CSP errors, or download and serve an approved copy under your own origin.
Blank or incomplete output
Wait for lazy content and fonts, scroll the element into view, and temporarily disable animations. Check whether the element is hidden, has a zero-sized ancestor, or depends on unsupported CSS.
Security error at toDataURL
This usually indicates a tainted canvas from a cross-origin image. Confirm the image response includes suitable CORS headers, remove or replace the image, or switch to Firefox’s native Screenshot Node command.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
The bookmark does nothing
Edit the bookmark and verify that its URL starts with the literal javascript:. Firefox may strip that prefix during paste; retype it, save, and try again from a regular web page rather than a restricted internal page such as about:addons.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Or skip the browser setup
If your goal is a reliable selector capture in code or CI, ScreenshotNeo accepts a CSS selector and returns an image without maintaining a Firefox session. Its clean-shot workflow accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status.
One GET request is enough (see the ScreenshotNeo documentation):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
For an element, add the selector parameter supported by the API:
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://stripe.com
--data-urlencode selector="#content"
-o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com", "selector": "#content"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com', selector: '#content' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await Bun.write('shot.webp', res);
ScreenshotNeo also offers full-page lazy-image loading, dark mode, device presets and arbitrary viewports, retina scale, custom CSS and JavaScript, waits for selectors, delays or network idle, request and resource blocking, cookies and headers, geolocation and timezone, resizing, caching with a chosen TTL, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
Plans include 1,000 free shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
FAQ
Can a bookmarklet capture an element inside a same-origin iframe?
Only after running code in that iframe’s document context. A top-level page script cannot cross a different origin because of browser security rules.
Does scale change CSS dimensions?
No. It changes the canvas pixel density while preserving the element’s logical layout size.
Can I save JPEG or WebP instead of PNG?
Change the download filename and pass the matching MIME type to toDataURL(), such as canvas.toDataURL('image/jpeg', 0.9); lossy formats can introduce artifacts.
Frequently Asked Questions
Can a bookmarklet capture an element inside a same-origin iframe?
Only after running code in that iframe’s document context. A top-level page script cannot cross a different origin because of browser security rules.
Does scale change CSS dimensions?
No. It changes canvas pixel density while preserving the element’s logical layout size.
Can I save JPEG or WebP instead of PNG?
Change the download filename and pass the matching MIME type to toDataURL(), such as canvas.toDataURL(‘image/jpeg’, 0.9); lossy formats can introduce artifacts.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

