How do I install and use cURL on Windows?

How do I install and use cURL on Windows?

I’m having trouble getting cURL on Windows to run properly.

  • I downloaded a cURL zip file, but it seems to contain source code instead of an executable.
  • Do I need to compile cURL to use it? If so, how do I do that?
  • Where can I find a .exe version of cURL for direct installation?

I’ve searched for documentation on installing cURL on Windows, but I haven’t found clear instructions. How can I set it up correctly?

If you’re on Windows 10 or later, you’re in luck—cURL comes pre-installed! :tada: Just open Command Prompt (cmd) or PowerShell and run:

curl --version

If you see a version number, you’re good to go!

:exclamation: If you get an error, make sure your system path includes C:\Windows\System32\, where curl windows is located.

That’s great if you have a recent Windows version! But what if cURL isn’t installed or you need a newer version? No worries!

:one: Download the latest curl windows binary from cURL’s official site. :two: Extract the .zip to a folder like C:\curl. :three: Add it to your system PATH:

  • Open System PropertiesAdvancedEnvironment Variables.
  • Find Path, click Edit, and add C:\curl\bin.

Now restart your terminal and check with:

curl --version

:white_check_mark: You should be all set!

Manually setting up paths? I prefer an easier way! If you’re into automation, Chocolatey makes installing curl windows super simple.

:one: First, install Chocolatey (if you haven’t already). Open PowerShell as Administrator and run:

Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

:two: Then, install cURL with just one command:

choco install curl -y

:three: Finally, verify the installation:

curl --version

:rocket: This method automatically handles installation and system path setup—no extra steps needed!