Extract Icon from EXE or DLL File in Windows 10

Save Icon Big 256

How to Extract an Icon from an EXE or DLL File in Windows 10

In this post, we will review a few tools that allow extracting icons from files in Windows 10. Windows allows using icons hardcoded to binary files like DLL and EXE for Desktop shortcut icons, but doesn't come with any option to extract those icons and save as ICO or PNG files. Here's how it can be done.

The ICO file format is an image file format used for app and shortcut icons in Windows. An ICO file contains one or more images at multiple sizes and color depths, so they can look well with various screen resolutions and scaling. Traditionally, executable files include an icon in ICO format bundled, so they appear in the Start menu, and on Desktop as icons for the shortcuts. However, it is possible to assign a custom icon to a shortcut by loading it from an external *.ICO file, *.EXE file, *.DLL file, or from any other file that has icon resources.

In Windows 10. there are plenty of good icons in the following files:

C:\Windows\system32\shell32.dll
C:\Windows\system32\imageres.dll
C:\Windows\system32\moricons.dll
C:\Windows\explorer.exe

To extract an icon from a file, you need to use a third-party tool. There are plenty of tools available for that purpose. I'll cover three trusted freeware tools I personally love and use.

We will start with Resource Hacker, the tool that doesn't require to be introduced. It is a famous resource editor app.

To Extract Icon from EXE or DLL File in Windows 10,

  1. Download Resource Hacker.
  2. Install the app.
  3. Launch the app from the Start menu.
  4. In the app, go to the File > Open menu, or press Ctrl + O to browse for the file you want to extract an icon from (I will open c:\windows\explorer.exe).
  5. In the left pane, expand the Icon group and navigate to the desired icon (use the preview area on the right).
  6. From the menu, select Action > Save *.ico resource.
  7. Browse for the folder to store your ICO file and give it a name. You can put it right in your Desktop folder. Then click on Save.

You are done! The icon is now extracted and saved to the *.ico file:

A few notes

  1. Resource Hacker is a 32-bit app. If you are running it in a 64-bit Windows 10 version, it may fail to open certain system files. In this case you can copy them to another directory, e.g. you can copy the c:\windows\system32\shell32.dll file to c:\data and open the c:\data\shell32.dll file in Resource Hacker. This always works.
  2. By saving individual icons from the Icon group, you are getting an ICO file with a single icon size inside. This may or may not be convenient, depending on for what you are trying to extract the icon.
  3. To get an ICO file with all the available icon sizes, navigate to the Icon Group node in the left pane, expand it, and then repeats the steps from the above starting with the step #6.

Some users may find using Resource Hacker a bit complicated. So, here are a couple of alternative apps, IconViewer and IcoFX, which will additionally allow you to save icon resources to other image formats, including PNG and BMP.

Extract an Icon from EXE or DLL Files with IconViewer

  1. Download IconViewer. It has both 32-bit and 64-bit versions for your 32-bit or 64-bit OS.
  2. Install the app.
  3. Open File Explorer and navigate to the destination folder that contains the file you want to extract icons from. E.g., go to c:\Windows\System32.
  4. Right-click on the file with icons, e.g. shell32.dll, and select Properties from the context menu.
  5. Switch to the Icons tab added by the IconViewer app.
  6. Select the icon you want to extract, and click on the floppy disk icon to save it to a file.
  7. Specify the destination folder, file name, and select the file format (ICO, PNG, or BMP) to save the icon. Click on the Save button.
  8. The icon is now saved.

You are done. IconViewer is a convenient and easy-to-use app that will save your time every time you need to extract an icon from a file in Windows 10.

Finally, there is yet another Freeware tool that you can use. It is called IcoFX (the official IcoFX web site). It was a freeware app, but recent app versions require a paid license. Lucky, FileHippo still hosts its last freeware version 1.6.4.

Using IcoFX

The main difference of IcoFX from apps mentioned above is that IcoFX is a full featured icon editor. Resource Hacker allows modifying binary files. IconViewer is just an icon resource extractor. With help of IcoFX you can draw you own icons using a number of drawing tools and graphical effects.

Here's how to use it.

To extract an icon from a file with IcoFX,

  1. Download the app (or buy the most recent version).
  2. Select File > Open from the menu (or press Ctrl + O).
  3. Select a file to extract an icon from.
  4. You will see a dialog with all icons the app was able to find in the file.
  5. Select the icon and click on Extract. This will open the icon in the editor.
  6. To extract an icon of the specific size, right-click on its thumbnail in the left pane of the editor and select Export Image... from the context menu.
  7. Specify the folder to store the file, the desired file format (PNG, BMP, JPEG, GIF, or JP2), and give the name to your file.
  8. Click on the Save button.

You are done!

To save the extracted icon as an ICO file, the sequence is a little bit different.

To save the extracted icon as an ICO file with IcoFX,

  1. Select File > Open from the menu (or press Ctrl + O).
  2. Select a file to extract an icon from.
  3. You will see a dialog with all icons the app was able to find in the file.
  4. Select the icon and click on Extract. This will open the icon in the editor.
  5. Now, press CTRL + S or go to the File > Save menu.
  6. Specify the folder to store the file, and give the name to your file.
  7. You can choose between the Windows icon file format (*.ico) and Macintosh icons (*.icns)
  8. Click on the Save button.

You are done. This will write all the icons of sizes and format displayed in the editor to your ICO file.

That's it!

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

6 thoughts on “Extract Icon from EXE or DLL File in Windows 10”

  1. Another equally good tool is Redwood. I have used it successfully for a number of years and it has never failed to satisfy.

    Check it out!

  2. I tried with ResourceHacker but it do not find any icon from shell32 and no other dlls i tested. Tried with imageres.dll too and many others. The icon folder just do not list -.-

    https://prnt.sc/1ih7kq1

    Any idea how fix it, please?

    ty!!!!

    1. Thats because Microsoft moved them in newer Windows.
      C:\Windows\SystemResources\shell32.dll.mun
      C:\Windows\SystemResources\imageres.dll.mun
      C:\Windows\SystemResources\moricons.dll.mun

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.