How to Change the Icon for a File Type in Windows

Surprisingly, Windows doesn’t have a built-in option to allow users to set custom icons for file types. If you have a custom file type and the corresponding program doesn’t have a nice-looking icon in its .exe or .dll resource, you can manually change or customize the default icon for that file type.

This article explains how to change the default icon for a file type using different methods in Windows. Instructions apply to all versions of Windows, including Windows 10

How to Change the Default Icon for a File Type

You can change the default icon for a file type using the built-in Registry Editor. In the second method, let’s see how to change the default icon using Default Programs Editor.

Method 1: Using the Registry Editor

Let’s assume you want to change the file type icon for .txt files, and here is how to do that.

  1. Click Start, type regedit.exe , and press Enter
  2. Navigate to the following branch:
  3. In the right pane, note down the value data for Progid (e.g. txtfile). This is the user-chosen (via Default Programs or Open with dialog) Programmatic Identifier for the file extension.

    Registry Branch Not Found?

  4. If the UserChoice branch does not exist, navigate to the following branch:
  5. In the right pane, note down the (default) value data (e.g. txtfile).
  6. Navigate to the following key (where txtfile is the Prog ID noted in Step 2 or Step 4 above)

    If the DefaultIcon key does not exist by default, you need to create it manually.

  7. In the right-pane, double-click (default) and mention the path to your custom icon (.ico file or reference to an icon inside an EXE/DLL file. See “Icons From DLL/EXE Files” paragraph at the end of this article).
  8. Edit the (default) value data, mentioning the path to an icon file. For this example, I used a notepad icon file from the web, saved it to a permanent location, and mentioned the full path.
    If you’re using a custom icon file, make sure it’s at least 128 x 128. Although it’s not a rule, this is to make sure icons look nice when folder view is set to large or extra-large icons.

  9. Exit the Registry Editor.
  10. Log off, log back in, or refresh the icons and see if the Text file icons are updated.

Icons From DLL/EXE Files

If you don’t have a custom .ico file, you may use the icon picker dialog box to choose an icon from an EXE/DLL file.

  1. To launch the icon picker dialog, right-click on a folder in your system, click Properties.
  2. Click the Customize tab, and click the “Change Icon…” button.
  3. Use the icon picker to choose the icon and make a note of the index. The index starts from “0“, and you need to proceed vertically when counting (top to bottom.)
    change file type icon - icon picker dialog
  4. Browse to shell32.dll or imageres.dll and note down the icon index.
  5. Cancel the icon picker dialog and close the folder properties dialog.

For example, to set the 260th icon in Shell32.dll, mention the following path in Step 8:


(This procedure doesn’t change the file type associations, only the icon assigned to that file type. If the icons don’t update even if you restart Windows, refresh the icons manually or rebuild the icon cache.)

Additional note

As the icon change is made to the ProgId txtfile in the registry, it also affects the other file extensions that use the same ProgId. For instance, in my system, the txtfile ProgID is being used by .log, .scp & .wtx file extensions. Those files will also show up with the new icon.

To know which file extensions are using a ProgID (i.e., txtfile), run this command in the Command Prompt window:

assoc | findstr /i "txtfile"

How to Change the Icon for a File Type in Windows

RELATED: See article How to Remove File Type Associations Using the Registry Editor for more information on File extension → ProgID mapping.

It’s possible to change the default icon for a file type without affecting other file types. To do that, you’ll need to create a new file class or ProgID for the file extension, and assign the default icon in the newly created file class.

Method 2: Using Default Programs Editor

Don’t want to edit the registry to change file type icons? There are 3rd party tools like Default Programs Editor and FileTypesMan that can change the file type icons and association settings.

Default Programs Editor is a useful tool that helps you edit file type associations and add or remove AutoPlay handlers and static context menu entries. We’ve covered Default Programs Editor before. Default Programs Editor – A Useful File Association Editor

In this method, let us see how you can accomplish the task using the Default Programs Editor.

  1. Download Default Programs Editor, unzip, and run the executable.
  2. Select File Type Settings
    How to Change the Icon for a File Type in Windows
  3. Click Icon
    How to Change the Icon for a File Type in Windows
  4. Select the file extension for which you want to change the icon, on the next screen.
    How to Change the Icon for a File Type in Windows
  5. This screen shows the current icon for the file type. To change it, click on the Browse button.
    change the default icon for a file type
  6. In the icon picker dialog, browse and locate an icon, or point to a custom .ico file if you have one. The built-in imageres.dll and shell32.dll files contain many icons for you to choose from.
    change the default icon for a file type
  7. Click the Save Icon button to save the changes to the registry.
    As you can see in the screenshot, you also can save the settings to a file. If you need to apply the changes to several computers, you can output the settings to a .REG file. This can be done by clicking the arrow mark near the Save Icon button and choosing Save to .reg file. You can deploy or apply the .reg file on other computers without having to rerun the utility.

That’s it! The default icon for .txt file type is changed, and the icons should refresh automatically.

change the default icon for a file type
[Before] .txt files showing standard icons
change the default icon for a file type
[After] .txt files showing custom icons

Method 3: Using FileTypesMan

FileTypesMan list of all file extensions and types registered on your computer. For each file type, the following information is displayed: Type Name, Description, MIME Type, Perceived Type, Flags, Browser Flags, and more. FileTypesMan also allows you to edit the properties and flags of each file type easily and allows you to add, edit, and remove actions in a file type. This utility works in all Windows versions including, Windows 10.


How to Change the Icon for a File Type in Windows

How to Change the Icon for a File Type in Windows

%SystemRoot%\system32\imageres.dll,-102 is the Windows-default icon for .txt files.

How to Change the Icon for a File Type in Windows
Windows-default icon for .txt files

After setting the default icon to %SystemRoot%\system32\imageres.dll,14 via the icon picker dialog, here is how it shows up:

How to Change the Icon for a File Type in Windows
Customized .txt files icon

Change the icon for Unknown and Extensionless files

File types that are not registered with the system and files with no extension are assigned a generic icon from shell32.dll,0 by default. The unknown or generic icon for unregistered file types and extensionless files can be customized as per your choice so that you don’t have to see the boring icon anymore.

Windows stores the icon setting for unknown file types and extensionless files in this registry key:


The (default) or the unnamed value points to the following icon resource by default:


Using the Registry Editor (regedit.exe), you can change the (default) value so that it points to a .ico file that you already have or an icon resource inside a .dll or .exe file by mentioning the file name and resource identifier.

Using the Icon picker (a.k.a. the Change Icon dialog), you can use a relevant icon in shell32.dll, 224 that can be assigned for unregistered and extensionless files. You just need to replace the existing Value data (%SystemRoot%\System32\shell32.dll,0) with %SystemRoot%\System32\shell32.dll,224 using the Registry Editor or using the REG files below.

Log off and login back into your account.

Here is how it looked before:

change icon for unknown file type

We’ve changed that to:

change icon for unknown file type

Tip: If the icons don’t automatically refresh even after a logoff-logon cycle, you can force a shell icon refresh using the ie4uinit.exe method or using Default Programs.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded in 2005.

26 thoughts on “How to Change the Icon for a File Type in Windows”

  1. wow ! I have spent what seems to be countless hours trying to change the icons on boring
    mp3, wma and mp4 songs without having to alter my registry.

    This program is powerful and I can’t thank you enough for sharing it with me !!

    Smiling again because of you 🙂

  2. Thank you for the useful information. But the “Default” key is no longer called so in Windows 7, but rather called “Standard”. Actually this confused me a bit till I noticed, since I’m not too familiar with messing with registry ^^.

  3. Is there any way to change the icon of just one file? I made a program and compiled it to an .exe and I don’t want it being the VB6 icon(i know, it’s old). But I have windows 7. I could do it on my old windows XP computer, but not on my new one

  4. Thanks for this pointing me to the very cool tool. One issue I am experiencing – it won’t change my .msg icons (I have dragged Outlook mesages into files on “My Documents” although it says it has. Any suggestions?

  5. This tool resolved a problem which annoyed me since the beginning of this year. I have a file type .!!! for important text files (and of course .txt and .ini) which are all opened by the same program (EditPadPro). However since changing to Windows 7 both .!!! and .ini had the same file icon – and i did not find a method to change that.
    Thanks for this tool.

  6. Thanks, this was a big help. But you should add an explanaition on how to “manually add the DefaultIcon key.” I decided to right click on the abcfile and found I could choose Key as an option.

    Also, my Windows 7 doesn’t have a Change Icon option on the Customize tab. There is a section for “Folder pictures” with Choose File that lets you browse for a file.

    I used this as a workaround by copying the image I wanted into the Pictures folder and using that path in step 7.

  7. .jpg and .png have different icons, but both open with Windows Photo Viewer.
    This is what I would like: .m3u and .flac to have different icons, but both open in winamp.

  8. Everything works, got mp3, m3u, and flac with different icons, all opening in Winamp, thanks!
    I didn’t feel like restarting, so as in the link I pressed start…default programs…set your default programs… and made firefox my default, which it already is.

  9. This blog entry was immensely helpful to me. Can’t thank you enough. I was having a really hard time getting the correct icons for pdf files.

  10. There is a much easier and safer solution (at least for Win 7). See if your issue is the same as mine: I had .mp4 files set to open with VLC. They were named as VLC files, VLC had them selected as a default file type in the ‘Set Your Default Programs’ dialogue, and VLC was also the default in the file ‘Properties’ tab in Explorer. BUT, the icon for mp4 files was not the VLC icon, it was the Windows Media icon.

    This solved it:

    In the start menu, type ‘default programs’ and then go to that menu. Pick the 2nd option, ‘Associate a file type or protocol with a program’. When the list populates, choose the file type and click the ‘change association’ button. Choose the desired program, EVEN IF IT IS THE SAME PROGRAM YOU ARE CURRENTLY USING. When you hit ‘ok’, you will see that the file type icon now matches the program icon.

    Let me know if this works for you!

  11. go to


    Right clock on userchoice, select delete

    restart computer…..

  12. Ridiculously convoluted way to simply change a bloody icon.

    “One step forward, two steps back” seems to be the motto for Microsoft

  13. Terrific Tool. Microsoft clearly couldn’t care less about their customers. I find it beyond incredible that the built-in ability to do this was removed.

  14. The icon change is a multi-level problem. There are several “levels” at which one could/should change the icon.
    The following might help in cases where the above mentioned solution did not succeed.
    Example: Installed software (e.g. Inkscape 64-bit build) does not contain an icon in its exe.
    Action: *.svg is assigned via: right click -> open with -> … select path to inkscape.exe
    Result: all *.svg files show the icon inkscape.exe does = none
    Solution: execute regedit, search for: inkscape.exe (name of *.exe you did assign to file type) continue until you locate: HKEY_USERS\…\…\Software\Classes\Applications\inkscape.exe\… (…\Applications\[your software].exe\…).
    Under inkscape.exe add DefaultIcon key. Now next to other folders (e.g. …\shell) inkscape.exe\DefaultIcon\ should be available. Now edit the default key to the path to the icon file you want to assign. In this case (including the “) “C:\Program Files\Inkscape-0.48\inkscape.ico” did result in the selected icon being displayed for all *.svg files (analogue the files you associated with your software).
    Note: Icon cache can be either refreshed by 1) using “Set default” for a random file with random program you use to edit it (e.g. right click *.txt-> open with the default txt program you open it with anyway)) 2) changing screen resolution from 32-bit to 16-bit and back again 3) Restarting the computer
    Below find a list of seemingly random, working exemplary icons paths as encountered from the registry:
    “C:\…\Program.exe”,0 or C:\…\Program.exe or C:\Windows\System32\imageres.dll,-109 (number as explained above) or “C:\..\program.ico” or “C:\…\Program.exe,0 (no second “) or X:\…\Program.ico or “C:\PROGRA~1\…\PROGRAM.DLL”,-114

  15. Completely unhelpful. Most of us can figure out how to change the file icons like this. What is hard is trying to change it so that the file types themselves are different icons even though they open in the same program. I know this is possible, as it does this for a lot of stuff in Windows 7, but sometimes if files are associated a certain way (which I’m not sure of how) then all files, regardless of being different extensions, are stuck with the same damn icon, which is infuriating. Super infuriating. I don’t know wtf Micro$oft was thinking, but once again they changed & took something away from power users, which affected nobody & was never a problem for anyone, so didn’t need to be removed.

    • I found a solution. I’m not sure it will work on any program, but with Notepad++ it does.

      – Make a copy of your .exe to the program directory next to the original one.
      – Rename it to the filename + extension. e.g.: Notepad++.exe —> Notepad++txt.exe
      – Repeat the process for each individual extension you desire.
      – Associate your extensions with the created executeables.
      – After this, you can set your own icons either via regedit or Default Programs Editor.

  16. Hi! I’ve been using the Default Program Editor to change file type icons for many years now and I am happy with it. Except one thing:
    I’ve created a reg file to include all the icons I have made, because some program updates reverse my changes; than I have to run the reg file, *and restart the computer in order to see the changes*. My question is: What line should I add below, for example, this

    @=”C:\\My Stuff\\My Files\\My Icons\\Icons\\txt.ico,0″

    so that the icons change without having to restart the computer?


Leave a Comment