Convert HTML to an image, PDF or string
Alternatives To Browsershot
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Pageres9,48724159a year ago51October 27, 202219mitTypeScript
Capture website screenshots
Browsershot4,44098272 days ago132July 27, 20233mitPHP
Convert HTML to an image, PDF or string
2 days ago82March 21, 202360gpl-3.0Go
An archiving tool with an IM-style interface that prioritizes privacy and accessibility, integrated with various archival services including Internet Archive,, IPFS, Telegraph, and file systems.
1click Webpage Screenshot449
5 months ago66iscJavaScript
Entire page Screenshot extension for Google Chrome. I'm developing open source extension for Google Chrome. All extension are free for use. Let's make Chrome great again!
2 years ago2July 26, 202011gpl-3.0Python
Web Inventory tool, takes screenshots of webpages using Pyppeteer (headless Chrome/Chromium) and provides some extra bells & whistles to make life easier.
Screenshot Stream22680114 years ago31June 11, 20179mitJavaScript
Capture screenshot of a website and return it as a stream
2 years ago3Python
Command line webpage screenshot and thubnail generator
Screencap1733424 years ago6July 19, 201521mitJavaScript
A gem to screencap webpages in ruby. Uses Phantom.js under the hood.
Nodejs Serverless Microservices Demo72
5 years ago1apache-2.0JavaScript
A set of Node.js microservices to track visual changes of web pages.
1a year ago9March 29, 2022mitPHP
A PHP wrapper for using Google Chrome Headless mode. Convert URL or HTML to a PDF / screenshot. Easy to use and OOP interfaced.
Alternatives To Browsershot
Select To Compare

Alternative Project Comparisons

Social Card of Spatie's Browsershot

Convert a webpage to an image or pdf using headless Chrome

Latest Version MIT Licensed run-tests Total Downloads

The package can convert a webpage to an image or pdf. The conversion is done behind the scenes by Puppeteer which controls a headless version of Google Chrome.

Here's a quick example:

use Spatie\Browsershot\Browsershot;

// an image will be saved

It will save a pdf if the path passed to the save method has a pdf extension.

// a pdf will be saved

You can also use an arbitrary html input, simply replace the url method with html:

Browsershot::html('<h1>Hello world!!</h1>')->save('example.pdf');

If your HTML input is already in a file locally use the :


Browsershot also can get the body of an html page after JavaScript has been executed:

Browsershot::url('')->bodyHtml(); // returns the html of the body

If you wish to retrieve an array list with all of the requests that the page triggered you can do so:

$requests = Browsershot::url('')

foreach ($requests as $request) {
    $url = $request['url']; //

To use Chrome's new headless mode pass the newHeadless method:


Support us

Learn how to create a package like this one, by watching our premium video course:

Laravel Package training

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.


All documentation is available on our documentation site.


Please see CONTRIBUTING for details.


If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.


If you're not able to install Node and Puppeteer, take a look at v2 of browsershot, which uses Chrome headless CLI to take a screenshot. v2 is not maintained anymore, but should work pretty well.

If using headless Chrome does not work for you take a look at at v1 of this package which uses the abandoned PhantomJS binary.


And a special thanks to Caneco for the logo


The MIT License (MIT). Please see License File for more information.

Popular Screenshot Projects
Popular Webpage Projects
Popular Media Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.