How do I install and use curl on Windows?
I am having trouble getting curl to run on Windows.
I have downloaded a curl zip file from here, but it seems to contain source code, not an executable.
Do I need to compile curl to run it? If yes, then how do I do that?
Where can I find
.exe downloads for curl?
I have looked for documentation on installing curl, but there is little to be found.
Assuming you got it from https://curl.haxx.se/download.html, just unzip it wherever you want. No need to install. If you are going to use SSL, you need to download the OpenSSL DLLs, available from curl's website.
You might already have curl
It is possible that you won't need to download anything:
If you are on Windows 10, version 1803 or later, your OS ships with a copy of curl, already set up and ready to use.
Simply add the above path to
Installing curl with a package manager
If you are already using a package manager, it may be more convenient to install with one:
- For Chocolatey, run
choco install curl
- For MSYS2, run
pacman -S curl
- For Scoop, run
scoop install curl
- For Cygwin, add the curl package in Cygwin Setup. EDIT by a reader: Cygwin installer design has changed, please choose curl packages as follows:
Installing curl manually
It is too easy to accidentally download the wrong thing. If, on the curl homepage, you click the large and prominent "Download" section in the site header, and then the large and prominent
curl-7.62.0.tar.gz link in its body, you will have downloaded a curl source package, which contains curl's source code but not
curl.exe. Watch out for that.
If you have more esoteric needs (e.g. you want cygwin builds, third-party builds, libcurl, header files, sources, etc.), use the curl download wizard. After answering five questions, you will be presented with a list of download links.
Extracting and setting up curl
curl.exe within your downloaded package; it's probably under
Pick a location on your hard drive that will serve as a permanent home for curl:
- If you want to give curl its own folder,
- If you have many loose executables, and you do not want to add many individual folders to
PATH, use a single folder such as
C:\tools\for the purpose.
curl.exe under the folder. And never move the folder or its contents.
Next, you'll want to make curl available anywhere from the command line. To do this, add the folder to
PATH, like this:
- Click the Windows 10 start menu. Start typing "environment".
- You'll see the search result Edit the system environment variables. Choose it.
- A System Properties window will popup. Click the Environment Variables button at the bottom.
- Select the "Path" variable under "System variables" (the lower box). Click the Edit button.
- Click the Add button and paste in the folder path where
- Click OK as needed. Close open console windows and reopen, so they get the new
Now enjoy typing curl at any command prompt. Party time!
Read more… Read less…
- Download curl zip
- Extract the contents (if you have downloaded the correct version you should find curl.exe)
- Place curl.exe in a folder where you keep your software (e.g. D:\software\curl\curl.exe)
To run curl from the command line
a) Right-hand-click on "My Computer" icon
b) Select Properties
c) Click 'Advanced system settings' link
d) Go to tab [Advanced] - 'Environment Variables' button
e) Under System variable select 'Path' and Edit button
f) Add a semicolon followed by the path to where you placed your curl.exe (e.g. ;D:\software\curl)
Now you can run from the command line by typing:
- Download cURL (Win64 ia64 zip binary with SSL)
- Extract curl.exe into "
Even more easier:
Download the Win64 2000/XP x86_64 MSI installer provided by Edward LoPinto.
At the time of writing file
curl-7.46.0-win64.exe was the most recent. Tested with Windows 10.
Starting with Windows 10 version 1803 (and earlier, with insider build 17063), you don't install
curl anymore. Windows includes a native
C:\Windows\System32\, which you can access right from your regular
C:\Users\vonc>C:\Windows\System32\curl.exe --version curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL Release-Date: [unreleased] Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL C:\Users\vonc>C:\Windows\System32\tar.exe --version bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp
It's probably worth noting that Powershell v3 and up, contains a cmdlet called Invoke-WebRequest that has some curl-ish capabilities. The New-WebServiceProxy and Invoke-RestMethod cmdlets are probably worth mentioning too.
I'm not sure they will fit your needs or not, but although I'm not a Windows guy, I have to say I find the object approach PS takes, a lot easier to work with than utilities such as curl, wget etc. They may be worth taking a look at