Skip to main content
Microsoftbeginner

"curl is not recognized as an internal or external command" - How to Fix

Fix "'curl' is not recognized as an internal or external command, operable program or batch file" in Command Prompt. Restore System32 on PATH or install curl on older Windows.

6 min readUpdated September 2026

Command Prompt prints this when it cannot find curl.exe anywhere on your PATH:

'curl' is not recognized as an internal or external command,
operable program or batch file.

On Windows 10 build 17063 or later — and on all of Windows 11 — that almost never means curl is missing. It ships with the operating system. Check before you install anything:

dir C:\Windows\System32\curl.exe

If the file is listed, curl is installed and your PATH is broken. Go to Fix the PATH.

If Windows says File Not Found, curl is genuinely absent. Go to Install curl.

That single check decides everything else on this page, so run it first.

This error only comes from Command Prompt

The exact wording matters, because each Windows shell reports a missing command differently, and one of them lies to you:

ShellWhat a missing curl looks like
Command Prompt (cmd.exe)'curl' is not recognized as an internal or external command, operable program or batch file.
PowerShellThe term 'curl' is not recognized as the name of a cmdlet, function, script file, or operable program.
PowerShell 5.1, in practiceNo error at allcurl is an alias for Invoke-WebRequest

That last row is the trap. In Windows PowerShell 5.1, curl is a built-in alias for Invoke-WebRequest, a different command with different flags that answers to the same name. It runs happily on a machine where curl.exe has been deleted, so "but it works in PowerShell" tells you nothing. Test with the extension to bypass the alias:

curl.exe --version

If that prints a version, real curl is on your PATH and only your Command Prompt session is affected — usually because it was open before a PATH change.

Fix a PATH that lost System32

curl.exe lives in C:\Windows\System32. If that directory is not on your PATH, curl vanishes — and so does a lot else. Confirm the scope first:

where.exe ping
where.exe ipconfig

If those also report that they cannot find the files, System32 is definitely missing and this is a system-wide PATH problem rather than anything to do with curl.

Inspect the current value:

echo %PATH%

Look for C:\Windows\system32 or %SystemRoot%\system32. To restore it:

  1. Press Win+R, run SystemPropertiesAdvanced, and click Environment Variables.
  2. Under System variables, select Path and click Edit.
  3. Click New and add %SystemRoot%\system32.
  4. Add %SystemRoot% and %SystemRoot%\System32\Wbem too if they are also absent — they belong there.
  5. Click OK on every dialog.
  6. Open a new Command Prompt. An existing window keeps the PATH it started with for its whole life, so the fix will look like it failed if you test in the old window.
curl --version

Do this through the Environment Variables dialog rather than with setx. setx truncates PATH at 1024 characters and will silently destroy the rest of a long PATH — a much worse problem than the one you started with.

Advertisement

Why System32 goes missing

Nearly always an edit that replaced PATH instead of appending to it: an installer with a bug, a setx PATH "C:\some\tool" that omitted %PATH%, or a manual paste into the old single-line editor. Since the same mistake removes every other system directory at once, treat a missing curl as the symptom and a mangled PATH as the disease.

Install curl on older Windows

Windows 8.1, Windows 7 and Windows 10 builds before 17063 (version 1803) never shipped curl.exe. Check your build:

winver

A package manager is the least error-prone route, because it puts curl on PATH for you:

winget install curl.curl
choco install curl
scoop install curl

To install manually instead, download the official Windows build from curl.se/windows, extract it, and add the folder containing curl.exe to your PATH using the dialog steps above. Point PATH at the folder, not at the .exe itself — a common cause of the error persisting after a correct install.

Open a new Command Prompt and verify:

curl --version

When the file exists but still will not run

If dir finds C:\Windows\System32\curl.exe and PATH contains System32, but the command still fails, three things are worth checking.

Endpoint protection has quarantined it. Security products sometimes block or remove curl.exe because it is a convenient download tool for malware. Check your antivirus quarantine and block logs. Run it by full path to see the real error rather than cmd's generic wording:

C:\Windows\System32\curl.exe --version

You are on 32-bit cmd on 64-bit Windows. A 32-bit process reading C:\Windows\System32 is silently redirected to SysWOW64, which has no curl.exe. This affects 32-bit build tools and installers that shell out to cmd. Use C:\Windows\Sysnative\curl.exe from a 32-bit process, or run a 64-bit Command Prompt.

System file corruption. If curl.exe and other System32 executables are missing outright:

sfc /scannow

Run that from an Administrator Command Prompt. It restores missing Windows components from the component store.

Frequently Asked Questions

Find answers to common questions

cmd.exe searched every directory in PATH and found no curl.exe. On Windows 10 build 17063 and later curl.exe ships in C:\Windows\System32, so on a current Windows the cause is almost always that System32 is missing from your PATH rather than that curl is missing from your machine.

Yes, since Windows 10 build 17063 (version 1803). Windows 11 includes it too. It lives at C:\Windows\System32\curl.exe. Windows 8.1, Windows 7 and early Windows 10 builds do not ship it and need a real installation.

Run "dir C:\Windows\System32\curl.exe" in Command Prompt. If the file is listed, curl is installed and your PATH is the problem. If Windows reports File Not Found, curl is genuinely absent and you need to install it or upgrade Windows.

In Windows PowerShell 5.1 "curl" is an alias for Invoke-WebRequest, a completely different command that happens to answer to the same name. It succeeds without curl.exe existing at all, which makes PowerShell a misleading place to test. Always test with curl.exe, including the extension.

Open Settings, search for "Edit the system environment variables", click Environment Variables, select Path under System variables, click Edit, then New, and add %SystemRoot%\system32. Click OK on every dialog and open a new Command Prompt - existing windows keep the PATH they started with.

Almost always an edit that replaced the variable instead of appending to it - an installer, a setx command run without the existing value, or a manual paste into the old single-line editor. The same mistake usually breaks other built-in commands, so test with "where.exe ping" to confirm the scope.

Download the official Windows build from curl.se/windows, extract it, and add the folder containing curl.exe to your PATH. Alternatively install it with a package manager - "winget install curl.curl", "choco install curl" or "scoop install curl".

Yes. Endpoint protection sometimes quarantines or blocks curl.exe because attackers use it to download payloads. If dir finds the file but running it still fails, check your security product's quarantine and block logs before reinstalling anything.

That is cmd.exe listing everything it tried - an internal command, an executable on PATH, and a batch file - and reporting that none matched. It is the standard wording for any unresolved command name in Command Prompt and tells you nothing specific about curl.