Home > Tips and Tricks > Google Chrome

Take Screenshots of Websites in Chrome Without Opening It

In this guide, we will show you two interesting methods through which you could take screenshots of a website using Chrome without even opening it. This browser from the Silico Valley giants hardly needs an introduction of any sort. Its deep integration into the Google ecosystem, handy cross-device support, and tons of features have already been well-documented across various sites. However, there exists another pretty nifty yet underrated trick that doesn’t usually get the appreciation that it deserves.

We are talking about the ability to carry out various browser functionalities without even launching that browser in the first place. From disabling extensions to opening a new incognito mode, from disabling account sync to restoring your last browser session, all these tasks could be carried out without even interacting with Chrome in the first place. Along the same lines, you could also take screenshots of a website using Chrome without even opening it. And in this guide, we will show you how to do just that. Follow along.

How to Take Screenshots in Chrome Without Opening It

Take Screenshots of Websites in Chrome Without Opening It

To carry out these tasks, we will be making use of command-line tools. There exist a unique command for each of these tasks and moreover, there are three different approaches through which you could execute these commands. The first one is via Chrome’s target field, the next method is by using the Run dialog box and the final approach is through the Command Prompt window. Since the Target method is permanent in nature, we wouldn’t be using it for this purpose.

(This is because whenever you would launch Chrome, it would instead end up taking a screenshot!). Rather, we will be focusing on the CMD and Run methods, since they are temporary in nature and you could carry it out as and when required. Moreover, the command is the same for both these methods, so you could easily copy-paste it in either CMD or Run, depending on your preference. So without any further delay, let’s get started with the steps to take screenshots of a website using Chrome without opening it.

The Command Syntax

"Chrome EXE location" --headless --screenshot="save screenshot location and image name" "website URL"

Let’s understand each of these parameters and the values that you need to enter with the help of an example.

Example

  1. The first parameter in the above command is Chrome EXE location. So, if you have installed Chrome in the default directory, then its value will be
    C:\Program Files\Google\Chrome\Application\chrome.exe
  2. Next up, we have the “save screenshot location and image name”. Suppose, you wish to save the screenshot in D drive and name it image, then its value will be
    D:\images.jpg
  3. After that, we have the Website URL. Here, you need to enter the complete website whose screenshot you need to take. As an example, let’s take:
    https://droidwin.com
  4. So putting all these values in the command, we would get the final output as:
    "C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --screenshot="D:\images.jpg" "https://droidwin.com"

Testing the Command

Let’s now put it to the test. For that, you only need to copy-paste the output in the CMD window or the Run dialog box, depending upon your preference

Using CMD

  1. Head over to the Start Menu, search CMD, and open the Command Prompt.
  2. Then copy-paste the above value and hit Enter, which in our case is:
    "C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --screenshot="D:\images.jpg" "https://droidwin.com"

    Take Screenshots in Chrome Without Opening It

  3. You will get now the output image saved in the location that you have mentioned in the command.

Using Run

  1. Use the Windows+R shortcut keys to open the Run dialog box.
  2. Then type in the value and hit OK, which in our case is:
    "C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --screenshot="D:\images.jpg" "https://droidwin.com"

    Take Screenshots in Chrome Without Opening It

  3. You will get now the output image saved in the location that you have mentioned in the command.

Output

Take Screenshots in Chrome Without Opening It

Changing the Screenshot Window Size

By default, the screenshot size is 800 x 600. So the screenshot only compromises the top-most portion of the website. Well, turns out you could customize this value and get the screenshot as per your desired size.

Syntax

"Chrome EXE location" --headless --screenshot="save screenshot location and image name" --window-size=1000,2000 "website URL"

We have already explained the rest of the parameters, the new addition is the –window-size=1500,2500. You could change this value to the desired one. [Do note that this value is not under double quotes].

Example

Let’s take a screenshot optimized for tablet size displays, say widht= 1000 and height= 2000. So our command will transform to:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --screenshot="D:\images.jpg" --window-size=1000,2000 "https://droidwin.com"

Take Screenshots in Chrome Without Opening It

Output

Click on the below image to view the actual size screenshot (which in our case is 1000 x 2000).

So with this, we round off the guide on how you could take screenshots of a website using Chrome without opening it. We have shared two different methods for the same. Likewise, we have also listed the steps to change the size of the screenshots. If you have any queries concerning any of the aforementioned steps, then do let us know in the comments. We will get back to you with a solution at the earliest.


Share:
  • Hi when I try this on a Looker Studio URL the screenshot is only the login prompt, is there any way to use the Chrome profile of the one that’s logged into GWS? I’m only logged into one place.

  • Dionisis

    Is it possible to put a delay and then take the screenshot? Thats for the reason that due to internet connection problems it might take 5 secs to load a site. So i wanted to wait for 5 seconds and then capture the picture