Windows error codes
Look up what a Windows error code means: the Win32 codes from GetLastError, HRESULTs such as 0x80070005, NTSTATUS values such as 0xC0000005 and blue screen codes. It accepts the value in hexadecimal or decimal, the symbolic name or part of the message, and splits the HRESULT into its fields.
Examples:

Names and descriptions © Microsoft Corporation, taken from the Windows SDK header files and from the Microsoft Learn documentation, which is published under the CC BY 4.0 license. Descriptions are shown in your language when Microsoft has translated them.System error codes on Microsoft Learn

Common errors

Windows Update, installations and files

Programs that do not open or that close

Blue screens (bug checks)

How it works

Windows reports errors with numbers from four different families. Win32 codes, such as 5 or 1603, are the ones GetLastError returns. HRESULTs, such as 0x80070005, are those of COM, Windows Update and installers. NTSTATUS values, such as 0xC0000005, come from the kernel and appear when a program closes. Bug checks, such as 0xD1, are those of blue screens. The tool searches all four families at once, using the names and texts that Microsoft publishes in the Windows SDK.

Many HRESULTs carry a Win32 code or an NTSTATUS inside. When the value has FACILITY_WIN32, such as 0x80070005, the tool also shows the Win32 code it contains and its description, which is the one that really explains the error. It also splits the bits of the value: the severity, the facility that tells which component generated it, and the code within that facility.

Examples

0x80070005FACILITY_WIN32 (7) · 5 → ERROR_ACCESS_DENIEDAn HRESULT that starts with 0x8007 wraps a Win32 code in its last four digits: 0x0005 is 5, access denied.
-10737418190xC0000005 · STATUS_ACCESS_VIOLATIONEvent Viewer and process exit codes often show the value as a signed decimal. It is the same NTSTATUS as an access violation.
16030x80070643 · ERROR_INSTALL_FAILUREWindows Installer exits with 1603 when an installation fails, and Windows Update reports the same error as the HRESULT 0x80070643.

Use cases

  • Understand a Windows Update, Microsoft Store or installer error before looking for the fix.
  • Translate a process exit code or the value shown by Event Viewer into the name of the constant.
  • Identify the bug check of a blue screen from the stop code.
  • Find the value of a constant such as ERROR_ACCESS_DENIED or E_INVALIDARG while programming against the Windows API.
  • See the original English text of an error that appears translated, to search for it in forums and documentation.

Frequently asked questions

Why does the same number appear as two different errors?

Each family numbers its codes separately. 0x7B is the Win32 error 123, incorrect file name, and also the bug check INACCESSIBLE_BOOT_DEVICE of a blue screen. The context tells which one it is: if it came from a blue screen it is the bug check; if a program or a command returned it, the Win32 error.

How do you convert a Win32 code into an HRESULT?

With the HRESULT_FROM_WIN32 macro: take the code in hexadecimal and prefix it with 0x8007, which sets the error bit to 1 and the facility to 7 (WIN32). 5 becomes 0x80070005 and 1603, which is 0x643, becomes 0x80070643. To go back, take the last four digits.

Why does a negative number appear?

Error HRESULTs and NTSTATUS values have the highest bit set to 1, so when shown as a signed integer they give a negative number. -2147024891 is 0x80070005 and -1073741819 is 0xC0000005. The tool accepts both forms.

Why are some descriptions in English?

The translated descriptions are the ones Microsoft publishes on Microsoft Learn for Win32 codes. The texts of HRESULTs, NTSTATUS values and Win32 codes that Learn has not translated into your language are shown in English, as they appear in the Windows SDK.

What if the code does not appear?

Programs can define their own codes, especially those with the C bit set to 1 or a facility that is not a Windows one, and those are not in the SDK. In that case, look at the facility the tool shows to find out which component generated the error, and search for the code in that product's documentation.