Free tools Windows power users keep installed
One-click scans. No signup required.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Use page.setContent() when your HTML is a string, and page.open() when the page already lives at a URL. PhantomJS creates a browser-like page with require('webpage').create(); you can inspect it with page.evaluate() or save a rendered image with page.render(). The project is archived, so treat the examples below as a legacy maintenance guide rather than a recommendation for a new application. The PhantomJS repository was archived on May 30, 2023, and its 2.x branch is deprecated and no longer maintained (PhantomJS Wiki).
What PhantomJS can create
PhantomJS is a command-line tool that executes JavaScript files. A script creates a webpage object, loads either an address or supplied markup, then performs work inside that page. The basic object creation is:
var page = require('webpage').create();
The phrase “create an HTML page” can describe two different inputs:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →| Input | Method | Network request | Typical next step |
|---|---|---|---|
| An existing website URL | page.open(url, callback) |
Yes, PhantomJS loads the address | Check the callback status, then inspect or render |
| An HTML string in your script | page.setContent(html, url) |
No HTTP request | Evaluate the document or render it |
The second argument to setContent() supplies the page URL and origin-like context even though the markup came from your script. The method sets the content and URL, then reloads the webpage without making an HTTP request (setContent API).
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Create a page from an HTML string
If you literally have HTML text and want PhantomJS to create a document from it, put the markup in a string and pass it to setContent(). This complete script creates a heading, reads the title, prints it, and exits:
var page = require('webpage').create();
var html = '<!doctype html><html><head><title>Example</title></head><body><h1>Hello</h1></body></html>';
page.setContent(html, 'http://example.com/');
var title = page.evaluate(function () {
return document.title;
});
console.log(title);
phantom.exit();
Save the file, for example as create-page.js, and execute that JavaScript file with the PhantomJS command-line executable:
phantomjs create-page.js
The output is Example. The function passed to evaluate() runs in the page context, where document and other DOM APIs exist. Values crossing back to the PhantomJS script must be simple primitives or JSON-serializable objects; functions, closures and DOM nodes cannot be transferred (evaluate API).
Adding markup safely
For a larger document, use a JavaScript template string only if the PhantomJS JavaScript version in your environment accepts it; otherwise concatenate quoted strings. Escape quote characters that would terminate the JavaScript string. Keep the supplied URL syntactically complete, such as http://example.com/, because it becomes the page’s URL when PhantomJS reloads the content.
Reading structured data from the document
var page = require('webpage').create();
var html = '<!doctype html><html><head><title>Inventory</title></head><body><ul id="items"><li>Keyboard</li><li>Mouse</li></ul></body></html>';
page.setContent(html, 'http://example.com/catalog/');
var result = page.evaluate(function () {
return {
title: document.title,
items: Array.prototype.map.call(
document.querySelectorAll('#items li'),
function (item) { return item.textContent; }
)
};
});
console.log(JSON.stringify(result));
phantom.exit();
This returns a plain object containing the title and an array of strings. Returning the list elements themselves would violate the serialization boundary.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Load an existing URL with page.open()
When the HTML already exists on a server, call page.open(url, callback)[0m. The callback receives a status such as success or fail; inspect that value before calling evaluate() or render() (open API).
var page = require('webpage').create();
var url = 'https://example.com/';
page.open(url, function (status) {
if (status !== 'success') {
console.log('Could not load ' + url + ' (status: ' + status + ')');
phantom.exit(1);
return;
}
var title = page.evaluate(function () {
return document.title;
});
console.log(title);
phantom.exit();
});
Do not assume a usable document merely because the callback fired. A failed status should take the failure path, and the process should still be terminated with phantom.exit(). The official quick start uses the same status check before rendering (PhantomJS Quick Start).
Recommended Free Tools
Save the rendered page as an image
After a successful load (or after setContent() has created the document), call page.render() with an output filename:
var page = require('webpage').create();
page.open('https://example.com/', function (status) {
if (status !== 'success') {
console.log('Load failed: ' + status);
phantom.exit(1);
return;
}
page.render('example.png');
console.log('Saved example.png');
phantom.exit();
});
The quick-start documentation demonstrates this rendered-file workflow (Quick Start). Use a filename extension appropriate to the format supported by the PhantomJS build you maintain, and verify that the process has permission to write in the current directory.
Choose between setContent() and open()
Use setContent() for generated or fixture markup
- Your application already has the complete HTML string.
- You are testing a template or creating a deterministic fixture.
- You want to avoid an HTTP request while constructing the document.
- You need to choose the URL value used as the page context.
Use open() for a published page
- The source is identified by an HTTP or HTTPS URL.
- You need PhantomJS to perform the page load and report whether it succeeded.
- You intend to inspect the loaded document or render the loaded view.
These methods are alternatives for the input stage; evaluate() and render() are outcome stages. You can inspect either kind of page with evaluate(), and you can render either kind after the document is ready for your workflow.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Control the script lifecycle
PhantomJS is a command-line process, not a long-running browser window. Call phantom.exit() on every terminal path. In a callback, return immediately after an error exit so later code cannot run against a failed load.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchpage.open('https://example.com/', function (status) {
if (status !== 'success') {
phantom.exit(1);
return;
}
var data = page.evaluate(function () {
return { title: document.title, href: location.href };
});
console.log(JSON.stringify(data));
phantom.exit();
});
The page module exposes the creation API and related page operations in the Web Page Module reference. Keep all DOM access inside the function supplied to evaluate(); keep file output, logging and process exit in the outer PhantomJS script.
Troubleshoot common failures
The command never finishes
Cause: the script did not call phantom.exit() after its work. Fix: add an exit on both success and failure branches, including callbacks that report a failed status.
evaluate() returns an unusable value
Cause: the function attempted to return a DOM node, function or closure. Fix: return text, numbers, booleans, arrays or plain JSON objects, and extract the properties you need inside the page context.
The script inspects a page after a failed URL load
Cause: code ignored the success/fail status supplied to the open() callback. Fix: compare the status with 'success'; log the failure and exit before evaluating or rendering.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
The HTML string produces a syntax error
Cause: an unescaped quote or newline ended the JavaScript string early. Fix: escape quotes, build the string in smaller pieces, or use a supported multiline-string technique for the exact PhantomJS version you maintain.
The output image is missing
Cause: rendering occurred before a successful load, or the process lacked permission to write the destination. Fix: call page.render() only from the successful branch and use a writable, explicit output path.
Modern sites render incorrectly
Cause: PhantomJS is an archived project and its 2.x branch is deprecated and no longer maintained. Its documentation does not establish compatibility with current browser engines or web-platform features. Fix: keep PhantomJS for legacy scripts that require it, isolate it from new services, and evaluate a maintained browser automation tool before building new functionality. The archive status is recorded in the project wiki.
Operational guidance for legacy jobs
- Separate input and outcome: choose
setContent()oropen()first, then decide whether the job needs data fromevaluate(), an image fromrender(), or both. - Make failures explicit: log the URL and callback status, use a non-zero exit code for failures, and never process a page whose load status is not
success. - Keep transfers small and serializable: extract only the fields needed by the outer script instead of trying to return DOM objects.
- Pin the legacy runtime: because the project is archived, record the exact PhantomJS binary and script version used by your job so a future environment change is diagnosable.
- Validate artifacts: after
page.render(), check that the expected file exists and is readable before marking the job successful.
Or skip the browser setup
If your goal is simply to obtain a clean screenshot or PDF from a URL, ScreenshotNeo provides a website screenshot API and MCP server without maintaining a PhantomJS runtime. One GET request returns PNG, JPEG, WebP or PDF output. The API accepts options for full-page captures with lazy images loaded, a CSS-selector element capture, dark mode, 12 device presets or any viewport, retina scale, PDF paper size/margins/landscape/page ranges, custom CSS and JavaScript, clicks before capture, hidden selectors, waits for a selector/delay/network idle, ad and tracker blocking, custom headers/cookies/user agent/Authorization, timezone and geolocation, transparent backgrounds, resizing, configurable cache TTL, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage reporting and an OpenAPI specification. Parameter names used by other screenshot APIs also work for easier migration.
Before capture, ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed as clean shots, and response headers identify the page verdict and whether it was billed.
One-call cURL example
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for authentication, output controls and the complete option list.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also includes an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. Every feature is available on every plan:
| Plan | Included shots per month | Price |
|---|---|---|
| Free | 1,000 | $0, no card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Yearly billing provides two months free. Start with 1,000 free screenshots a month with no card; paid plans start at $5 for 3,000 shots.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsPhantomJS reference links
- Quick Start with PhantomJS — the basic load, status check and render flow.
- Web Page Module — page creation and API reference.
- content property — page-content API details.
- Page Automation with PhantomJS — broader automation examples.
Frequently Asked Questions
Does setContent() download the URL passed as its second argument?
No. It uses that string as the page URL while loading the supplied HTML and does not make an HTTP request for the document itself.
Can I return a DOM element from page.evaluate()?
No. Extract serializable properties such as text, attributes or coordinates and return those values instead.
Is PhantomJS a suitable foundation for a new production browser service?
The project repository is archived and the 2.x branch is deprecated and no longer maintained, so the documented workflow is best reserved for legacy maintenance rather than new browser automation.
The Bottom Line
For a supplied HTML string, call page.setContent(html, url); for a live address, call page.open(url, callback) and require a success status before using evaluate() or render(). Always terminate with phantom.exit(), and remember that PhantomJS is archived.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.

