How to Take Screenshots of Webpages via the Command Line

Sep 26, 2010 - Leave a Comment

Terminal in OS X You already know that you can take screenshots from the command line on Mac OS X, and now using a simple tool called webkit2png you can quickly take a screenshot of any webpage from the command line too.

You’ll need to have Safari and Python installed on your Mac (all Macs have Safari and new OS X versions have Python, some may require command line tools), as well as the aforementioned webkit2png tool (link below), then you’ll be able to take screen shots from the command line as follows:

The screenshots of the webpage then appear in your current working directory where the command is executed, and the entire webpage URL that it’s pointed at will be captured. Neat huh?

webpage screenshot command line

You can read more about webkit2png at the developers home.

Of course this is not the only way to take screen shots of entire webpages, and if you’d prefer to stay in the GUI you can use the tool called Paparazzi to capture an entire web page screenshot in OS X as well.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Manish Patel in Command Line, Mac OS X

Leave a Reply


Shop for Apple & Mac Deals on

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates