Extracting all URLs on a Web Page with Chrome Developer Tools
Posted on May 30, 2014 in Google Chrome, JavaScript by Matt Jennings

Thank you to Shan Eapen Koshy for positing a YouTube video on how to do this.

  1. In Chrome, go the website that you want to extract links from, like
  2.  Open Chrome Developer Tools by pressing Cmd + Opt + i (Mac) or F12 (Windows).
  3. Click the Console panel near the top of Chrome Developer Tools.
  4. Inside the Console panel paste the JavaScript below and press Enter:
  5. Now you will see all the links from that particular web page.
  6. You can also click the Undock into a separate window button (in the upper-right of Chrome Developer Tools and just left of the X that you can click to close Chrome Developer Tools). This will open a separate window that only displays Chrome Developer Tools along with the extracted links.

2 Responses

  1. Shwetha says:

    But when the same code is written for chrome extension it gives “undefined” as the result

Leave a Reply

To Top ↑