HKEY_CLASSES_ROOT Explained: The Merged Registry View, Why It Exists and Where Your Edits Really Go

Two tree branches marked by a monitor and a user icon merging into one trunk with a row of blank file tiles
Two tree branches marked by a monitor and a user icon merging into one trunk with a row of blank file tiles

Last reviewed: November 25, 2026. The steps and descriptions for HKEY_CLASSES_ROOT were compared with Microsoft documentation. None were run on a real PC, and the top picture is an illustration.

HKEY_CLASSES_ROOT is one of the predefined keys in the Windows registry, and most people meet it by accident. They open Registry Editor to fix one program, see a long list of file types and program classes, and then wonder why a change they made somewhere else did not show up. This guide explains what HKEY_CLASSES_ROOT holds, how its merged view is built, why edits can seem to vanish, and how to look at it safely. Our PC repair guides cover the wider registry. This article stays on one question: what HKEY_CLASSES_ROOT is and where its data really lives.

Quick answer

Quick answer

  • HKEY_CLASSES_ROOT, often written HKCR, is a merged view. It combines the machine-wide class settings under HKLM\Software\Classes with the per-user settings under HKCU\Software\Classes.
  • Microsoft says the user-specific settings have priority over the default settings, so a per-user entry is the one you see when both exist.
  • Most of what appears under the key is file extensions, ProgIDs, COM registrations and shell verbs.
  • Edits can seem to vanish or land in the wrong place, because the view does not show which branch holds the value.
  • Look first. Back up before any change, and do not use a registry cleaner for this area.

In this guide

Before you change anything

This article never changes anything on your PC. Every step below is look-only. If a change turns out to be needed, first back up the registry as described in our registry backup guide, and let someone qualified make the change. Before any change, create a restore point or confirm your recovery options, and keep the BitLocker recovery key if the drive is encrypted.

What HKEY_CLASSES_ROOT is

Microsoft describes HKEY_CLASSES_ROOT as a predefined key. It holds file name extension associations and COM class registration information, such as ProgIDs, CLSIDs and IIDs. In plain words, it is the part of the registry that answers two kinds of question: which program opens this type of file, and which software component does this class name point to.

Predefined keys are always-open entry points into the registry. Microsoft lists HKEY_CLASSES_ROOT alongside the other predefined keys, such as HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. Microsoft also notes that the key keeps support for older registration data from earlier versions of Windows. That is one reason the key still looks old-fashioned when you open it.

For a general tour of the registry, including hives, keys and values, read our guide to hives, keys and values. This article only covers the class part of it.

How the merged view is built

HKEY_CLASSES_ROOT does not hold its own separate store of data. It shows a combined view of two branches:

  • HKLM\Software\Classes: machine-wide settings that apply to all users on the computer.
  • HKCU\Software\Classes: settings that apply only to the user who is signed in.

Microsoft says the user-specific settings have priority over the default settings. Its example is a default that names one program for .doc files. A user can override that default with a different program, and the user's choice is the one that applies to that account.

Microsoft's merged view page describes the combination in more detail. The per-user branch is included, and a machine-wide subkey with the same name is left out of the view. The page is the reason a machine-wide value can seem to disappear when a per-user copy exists. Menu names and layouts can differ between Windows builds, so treat this as Microsoft's description and not a promise about every PC.

Per-user data is stored in the user's own registry files, which we cover in our guide to user registry files like UsrClass.dat. That is one more reason the same key can look different from one account to the next.

The merge in four steps

  1. Read the machine branch HKLM\Software\Classes supplies the defaults that apply to every user.
  2. Read the user branch HKCU\Software\Classes supplies the entries for the signed-in account.
  3. Combine the two per-user entries take priority, and machine entries fill in where no per-user copy exists.
  4. Show the result Registry Editor displays the combined result under HKEY_CLASSES_ROOT.

Keep this route in mind. Most of the confusion in this topic comes from forgetting that step 3 happens before anything is shown on screen.

What lives under the key

Most of what you see under HKEY_CLASSES_ROOT falls into a few groups. Knowing the group helps you decide whether you are looking at a file association, a COM registration or a right-click menu entry.

File extensions and ProgIDs

A key such as .txt names a file type. Its default value usually points to a ProgID, which is a named file type such as a text document class. The ProgID key then describes what opens that kind of file. On many PCs, the program you actually use is set through the file associations settings, not by hand in the registry. Before you look for it in the registry, read our file associations guide for Windows 11.

COM classes and CLSIDs

COM classes are software components that other programs call. Each one has a CLSID, a long identifier written in braces. The key that holds it usually says where the component file lives. When a component is missing or not registered, programs report errors. Two of those errors are covered in our class not registered error guide and our regsvr32 module failed to load guide.

Shell verbs and context menus

Right-click menu items are stored as verbs, such as open, edit or print, under file and folder keys. The shell command value tells Windows what to run when you pick an item. That is why it is worth reading and not worth changing blindly. Layouts differ between installed programs and between Windows builds, so the exact names you see can differ from any example.

Entries added by older software can make the menu slow or show items you do not recognize. Our right-click menu slow guide covers that problem at a high level.

Why edits seem to vanish

Because HKEY_CLASSES_ROOT is a view, the key you open may not be the one that holds the value that wins. If you edit a machine-wide value while a per-user copy exists, the per-user value still applies for that account, so your change looks like it did nothing. The reverse can happen too. A change written under the per-user branch stays only for that account and does not affect other users. Some older 32-bit programs write to a per-user VirtualStore instead, as explained in registry virtualization and VirtualStore.

Other common causes

Some changes come back after a restart for other reasons. A policy may control the setting and reapply it at sign-in. Another program may rewrite the value the next time it starts. You may also be looking at a different user profile from the one you are signed in as. Our guide on registry changes not saving or reverting works through the restart side of this problem.

Microsoft's HKEY_CLASSES_ROOT pages do not give a step to force a value to stick. This article does not offer one either. Look at both branches first, then decide who owns the setting.

Which branch holds what

The table below sums up the three places a reader is likely to look. None of the rows is a set of steps to follow.

BranchWhat it holdsWho writes to itTouch it?
HKEY_CLASSES_ROOT (merged view)A combined view of the two branches below, shown as one treeNot a separate store. A write goes to one of the two branches, depending on the key and the accountLook only
HKLM\Software\ClassesMachine-wide defaults for every user, such as system-wide file types and COM registrationsTypically installers and administrators, when a change applies to the whole PCLook only. Change only after a backup, and only with a qualified person
HKCU\Software\ClassesPer-user overrides for the signed-in account, which take priority in the viewThe signed-in user's programs and settingsLook only. Prefer the program or Windows setting that owns the choice

Where should a change go?

Use this decision tree before you think about any edit. If you reach a branch that says stop, the right move is to stop, look, and ask for help.

  • Is the change meant for every user on this PC?
    • Yes: it belongs in the machine branch. Stop here. Look only, make a backup, and let a qualified person decide. If Windows refuses access, our registry permission errors guide explains that message without suggesting a workaround.
    • No: is it meant only for the account you are signed in to?
      • Yes: it belongs in the user branch. Look first for a program or Windows setting that controls it, because that program usually writes the right key for you.
      • Not sure: stop. Look only. Check the file type or the program in its own settings before you go further.

Two more checks belong in the tree. If your organization manages the PC, the setting may be controlled by policy, and our Group Policy versus registry guide explains why editing the registry can be the wrong route. If the change arrives as a .reg file, check that first.

Before you run a .reg file

A .reg file can write many values at once, including values under this key. Before you run one, read whether it is safe to run in our guide on whether a reg file is safe to run. If the import fails part way, our cannot import reg file guide covers that message. Do not run a .reg file from an unknown source at all.

The 32-bit view

On 64-bit Windows, 32-bit programs have their own branch in some places, stored under a path that includes WOW6432Node. Class information for those programs can look different from what a 64-bit program sees. If a file type opens in one program but not in another, check whether each program is 32-bit or 64-bit before you assume a registration is missing.

The pattern is covered in our guide to Wow6432Node and 32-bit registry paths. We did not open a Microsoft page that lists every case, so treat the pattern as a starting point for your own look-only check and not as a complete rule.

A look-only tour in Registry Editor

The steps below only read the registry. They are useful for learning the layout, and they do not need any change to work. Read every step before you start, and close Registry Editor when you are done.

Good to know

Registry Editor can be blocked on some PCs. If it does not open, read our Registry Editor not opening guide for the messages, and do not try to get around a block.

Open Registry Editor

Press Win + R, type regedit, and press Enter. If User Account Control asks for approval, approving only opens the editor. Do not drag, rename or delete anything in the window.

You should see: the Registry Editor window with a left pane that lists the computer and its top-level keys.

If this does not help: menu names and prompts can differ between builds. Stop here and use the blocked-editor guide linked above.

Find the file extension key

Expand HKEY_CLASSES_ROOT and select the key named .txt. To find a key faster, read our guide to searching the registry for a key. Searching only moves the selection, so it does not change data.

ComputerHKEY_CLASSES_ROOT.txt

In the right pane, look at the (Default) value. It usually names a ProgID for the text file type on your PC. The name can differ between PCs. The (Default) entry is usually a text value; see registry value types for the other types.

You should see: a (Default) value with text in the Data column. An empty Data column means nothing is set for this extension at this level.

If this does not help: the extension may be set in the user branch instead. Check that in the next step.

Read the ProgID and the open command

Find the key whose name matches the ProgID you read. Expand it, then expand shell, then open, then command. The path looks like this:

shellopencommand

You should see: a (Default) value under command that names a program path and an argument such as %1. Read it only. Do not edit it.

If this does not help: some file types use a different layout or a different verb. Use the file associations guide linked earlier.

Repeat the check with a read-only command

You can read the same key from Command Prompt. The reg query command only reads, and our guide to reading the registry with reg query explains its options. Run this line as a normal user:

reg query HKCR\.txt

You should see: a line for HKEY_CLASSES_ROOT\.txt followed by its (Default) value.

If this does not help: an error that says the key was not found means this extension has no entry at this level on this PC. That is a finding, not a fault to fix.

Compare the two branches

Next, read the same extension in the two branches the view combines. Under HKEY_CURRENT_USER, open Software, then Classes, then .txt. Then open the same path under HKEY_LOCAL_MACHINE. Compare the (Default) values only. If they match, the per-user copy is not overriding anything. If they differ, the per-user value is the one that applies to your account.

You should see: either the same value in both branches or a different value in the user branch. Neither result is a reason to edit anything.

Mistakes to avoid

Most problems in this area come from good intentions. Someone sees a strange entry, decides it is junk, and removes it. Before you delete anything, read the notes below.

Do not delete an entry because it looks unfamiliar

Entries left behind by uninstalled software are often harmless, and some are needed by other programs. Our guide to leftover registry entries after uninstalling explains which ones are usually safe to leave alone. Run keys are a different area again, so our registry startup entries and Run keys guide covers those separately.

Do not use a registry cleaner

We do not recommend a registry cleaner for this area. No Microsoft page we opened documents a speed or repair benefit from registry cleaning, so this article does not promise one. Our registry cleaner for Windows 11 guide explains why, and our PC cleaner versus registry cleaner comparison covers the difference between the two kinds of tool.

Do not assume every odd entry is malware

An unexpected entry can be harmless, a leftover, or a sign of a real problem. Learn to tell them apart with our guide on how to check malware registry entries, which is look-only, before you make any decision.

Symptoms are not a diagnosis

Strange messages can come from a damaged registry, from a program, or from a policy. Our guide to signs of registry problems and their causes helps you sort the symptoms, and our corrupted registry guide covers the more serious cases. Neither one is a reason to start editing HKEY_CLASSES_ROOT.

If you are not sure which area a problem belongs to, the Repair Assistant can point you to the right guide. It does not replace a qualified person when a change is needed.

How this guide was checked

The steps and descriptions were compared with Microsoft documentation where that documentation exists. They were not run on a real PC. We did not test them in a lab, with other people, or on any account, and no credentials were used. The top picture is an illustration, not a screenshot of your PC. Where a menu name or claim could not be confirmed on a Microsoft page, the text says so.

Frequently asked questions

About the merged view

Is HKEY_CLASSES_ROOT a folder of its own data?

Not in the usual sense. Microsoft describes it as a merged view of two branches, HKLM\Software\Classes and HKCU\Software\Classes.

Which value wins when a machine entry and a user entry both exist?

Microsoft says the user-specific settings have priority over the default settings. The per-user entry is the one that applies to that account.

Why does the key show file types I did not set up myself?

Installed programs and Windows itself register file types and classes in those branches. Many entries come from software you installed, which is why leftovers can remain after an uninstall. Older leftovers are covered in the leftover registry entries guide listed in the mistakes section above, and most of them are usually harmless.

Does the 32-bit view change what the key shows?

It can. Some 32-bit programs use a separate branch, so check which program is involved before you assume a registration is missing. The Wow6432Node pattern is described in the 32-bit section above.

Safety and changes

Can I look at HKEY_CLASSES_ROOT safely?

Yes, if you only read. Opening Registry Editor and expanding keys does not change them. Do not press Delete, do not drag keys, and do not edit values while you are looking.

Should I use a registry cleaner on this key?

No. Microsoft's registry pages we opened do not document a speed or repair benefit from registry cleaning, so we do not recommend one. The cleaner comparison in the mistakes section above explains the difference between the two kinds of tool.

What should I do before any change to these keys?

Back up the registry first, following the registry backup guide linked in the warning at the top of this article. Then have a qualified person make the change. Read-only checks always come first.

What if a file type opens in the wrong program?

Start with the file associations settings in Windows. The file associations guide for Windows 11 covers that route. Read HKEY_CLASSES_ROOT only if you need to know what the setting points to.

Sources