Sep 11, 2011

Copy/Extract HTML Dropdownlist Options in Plain Text

You want to copy HTML dropdownlist(combobox) options from a web-page. You do right click on dropdown list. Oh my God !!! There is no option to do it. This article explains how to extract dropdownlist options using Notepad++.


1. Open site.
2. Now you need to get HTML source of dropdown list:

For Firefox with Firebug:
Right Click on HTML Dropdownlist, Select Inspect Element and In firebug, Right click and click copy InnerHTML option.

For IE8+:
Press F12, click arrow sign in developer tools and Select Dropdownlist. Now you will see html source is selected in developer tools, right click and click copy InnerHTML option.

For Chrome:
Right Click on HTML Dropdownlist, Select Inspect Element and In Developer Tools, you will see html source is selected. Right click and click Copy as HTML option.

3. Paste HTML source in Notepad++
4. Remove Select tag from top and bottom if exists
5. Put cursor at top of code and Press Ctrl + F
6. Go to Replace Tab and enter following info:
Find What:
Replace With:
Select Regular Expression as Search Mode and click on Replace All. If options are already in new line then no need to use \n in Replace With option.

notepad++ find and replace

You will get all options in plain text. If there are a lot of options, It will save bunch of time.


Update (Without Notepad++):

If you want to do it Without Notepad++, refer following post:

Copy DropDownList Data from a Website: Chrome Developer Tools/Firebug Tip

Share your opinion or alternate way to do this in below comment box.


  1. Unfortunately, my Inner HTML has the following
    Display1?display TypeAddressAllocated ToDisplay 3display5. Any changes in the RegEx based on this above coding please?

  2. thank you very much, this is really a good trick. This will save a lot of time to one of my poor colleague. great post !!!!

  3. Hi! I am trying to scrape a select options of a drop down list using a chrome plugin ‘scraper’. asked to input xpath value which i provided as //select. It inputs all the select options as concatenated stream ( without any delimiters ). Any suggestion, how could I add a delimiter ? BTW, your method here works great, I just want to try that approach because i have a massive workload. thanks

  4. Wow. The best thing that has happened to me in a while. Sad, maybe. But I have weekly research spreadsheets I do and finding this will save me hours upon hours of work. Such joy!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *