Is there a way to install cURL in Windows in order to run cURL commands from the command prompt?
-
4and then there is always vbscript / powershell http://stackoverflow.com/questions/204759/http-get-in-vbs – Kalpesh Soni May 01 '12 at 20:02
-
my curl is installed in xampp and is enable , can i make it work in windows cmd ? – Master Yoda Jan 25 '16 at 18:21
-
1I noticed the same question was posted on SuperUser here: http://superuser.com/questions/134685/run-curl-commands-from-windows-console – Simon East Dec 02 '16 at 04:03
-
7Starting May 2018, with Windows 10 build 1803, you can run curl directly from Windows console: https://stackoverflow.com/a/50200838/6309 – VonC May 06 '18 at 14:36
-
4actually curl was included since insider [build 17063 onwards](https://blogs.technet.microsoft.com/virtualization/2017/12/19/tar-and-curl-come-to-windows/) – phuclv Aug 20 '18 at 06:43
-
I've seen many answers, but the simplest is: (1) Download the curl binary here: https://curl.haxx.se/download.html (see the binary for your OS); (2) Create a folder "C:\curl" then unzip all there; (3) Edit the system variable called "Path" by adding ";C:\curl\bin" in the end. Finished. – Davidson Lima Mar 09 '20 at 19:38
-
1It's October 2020. If you have version 1803 or later of Windows 10, curl is installed by default. – z0rberg's Oct 24 '20 at 11:18
-
1Does this answer your question? [How do I install and use curl on Windows?](https://stackoverflow.com/questions/9507353/how-do-i-install-and-use-curl-on-windows) – KyleMit Oct 26 '20 at 20:04
-
1If you are using windows 10, mostly curl is installed. Open cmd and type curl --version to it verified. – Hiruni K Jul 26 '22 at 06:51
23 Answers
If you are not into Cygwin, you can use native Windows builds. Some are here: curl Download Wizard.

- 3,471
- 1
- 35
- 50

- 18,240
- 8
- 37
- 52
-
Also msys2, which I didn't see mentioned yet. You might have it already if you installed Haskell at some point for example. – DPM Aug 21 '17 at 00:37
-
15You can install `Git` and use the git bash. Built-in after install. (see answer below). – BRogers Jan 23 '18 at 20:06
-
1This is outdated, see answer https://stackoverflow.com/a/61384072/4385330 . In newer windows versions the curl command is available in PowerShell – Jojo Mar 12 '21 at 12:00
Update: Curl is now included in Windows, no need to run it via PowerShell.
First you need to download the cURL executable. For Windows 64bit, download it from here and for Windows 32bit download from here
After that, save the curl.exe
file on your C:
drive.
To use it, just open the command prompt
and type in:
C:\curl http://someurl.com

- 6,079
- 3
- 24
- 31
-
2
-
1It's really important to use " instead of ' if you are going to do it in Windows :) – chomp May 21 '18 at 13:20
-
1@Ricardo Sanchez , can we pass number of request call per second ? My Requirement is I need to hit URL 5 times in each second in windows OS. – Kms May 01 '21 at 07:58
-
1
-
@chomp That's right, I can confirm after an hour of trying it out! And someone is still wondering why I think the operating system is pure rubbish. Data: - d "{\"order\":\"1\",\"Name\":\"ts1\"}" – Twistleton Feb 03 '23 at 15:39
-
From a Windows Powershell, make sure to call 'curl.exe' instead of 'curl' which by default will only give an alias to Invoke-WebRequest, as explained here [https://curl.se/windows/microsoft.html](https://curl.se/windows/microsoft.html). – Eric Saund Jul 07 '23 at 18:53
If you have Git
installed on windows you can use the GNU Bash
.... it's built in.
https://superuser.com/questions/134685/run-curl-commands-from-windows-console/#483964
-
3This means that you would run it just like you would from OSX or Linux without using special commands btw. Just start the `Git Bash` and cURL away :) – BRogers Sep 19 '14 at 21:02
-
2This answer needs more upvotes. This is the way to go for users comfortable with mac terminal or unix distributions. – BigRon Jan 30 '16 at 19:54
-
1Thank you :) since I use Git primarily anyway (regardless of the OS I'm using) I need the Git Bash installed. I don't like installing wizards or extra bloat. I'm also not a big fan of trying to use PowerShell to do everything in windows – BRogers Mar 06 '17 at 20:10
-
I just validated that Git CMD also can run curl. Why CMD? so I didn't have to setup control-copy for Git Bash. – Aaron C Mar 31 '23 at 03:25
Update: Curl is now included in Windows, no need to run it via PowerShell.
Folks that don't literally need the curl
executable, but rather just need to e.g. see or save the results of a GET request now and again, can use powershell
directly. From a normal command prompt, type:
powershell -Command "(new-object net.webclient).DownloadString('http://example.com')"
which, while a bit wordy, is similar to typing
curl http://example.com/
in a more Unix-ish environment.
More information about net.webclient
is available here: WebClient Methods (System.Net).
UPDATE: I like how ImranHafeez took this one step further in this answer. I'd prefer a simpler cmd-script however, maybe creating a curl.cmd
file containing this:
@powershell -Command "(new-object net.webclient).DownloadString('%1')"
which could be called just like the Unix-ish example above:
curl http://example.com/

- 6,079
- 3
- 24
- 31

- 1,495
- 14
- 21
-
1Credentials may be given `powershell -Command "$wc=new-object net.webclient;$wc.Credentials=new-object System.Net.NetworkCredential(%user%,%pass%);$wc.DownloadString('%input%')"` from https://stackoverflow.com/a/509394/4985705 – Max Oct 20 '17 at 21:55
-
WARNING: This does NOT pass GET parameters to the page. I used this with a PHP page. `curl https://www.example.com/mypage.php?action=hello`. In the mypage.php script, `$_GET['action']` is empty – Stephen R Jun 26 '19 at 00:31
-
Modern windows installations have curl built in now. Try that before trying to implement it via powershell. – matty Jan 27 '22 at 17:06
If you use the Chocolatey package manager, you can install cURL by running this command from the command line or from PowerShell:
choco install curl

- 87,344
- 17
- 243
- 314
With Windows 10 Insider build 17063 curl is available in the cmd and powershell since early 2018.

- 427
- 3
- 8
Create batch file in windows and enjoy with cURL in windows :)
@echo off
echo You are about to use windows cURL, Enter your url after curl command below:
set /p input="curl "
cls
echo %input%
powershell -Command "(new-object net.webclient).DownloadString('%input%')"
pause

- 18,013
- 10
- 47
- 53

- 111
- 1
- 2
Currently in Windows 10 build 17063 and later, cURL
comes by default with windows. Then you don't need to download it and just use curl.exe
.

- 14,755
- 3
- 14
- 34
- Visit download page https://curl.haxx.se/download.html - it's incredible
- Choose your sytem in list
- Don't forget SSL support, it's obvious now, e.g. for https
- Unpack
curl.exe
and.crt
toC:\Windows\System32
- Restart cmd
- Enjoy
> curl https://api.stackexchange.com
p.s. If you want another folder to store executable check your paths > echo %PATH%

- 16,483
- 4
- 45
- 55
it should work perfectly fine if you would download it from --http://curl.haxx.se/dlwiz/?type=bin&os=Win64&flav=MinGW64 -- FOR 64BIT Win7/XP OR from http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-&ver=2000%2FXP --- FOR 32BIT Win7/XP just extract the files to c:/Windows and run it from cmd
C:\Users\WaQas>curl -v google.com
* About to connect() to google.com port 80 (#0)
* Trying 173.194.35.105...
* connected
* Connected to google.com (173.194.35.105) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.28.1
> Host: google.com
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 301 Moved Permanently
< Location: http://www.google.com/
< Content-Type: text/html; charset=UTF-8
< Date: Tue, 05 Feb 2013 00:50:57 GMT
< Expires: Thu, 07 Mar 2013 00:50:57 GMT
< Cache-Control: public, max-age=2592000
< Server: gws
< Content-Length: 219
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< X-Cache: MISS from LHR-CacheMARA3
< X-Cache-Lookup: HIT from LHR-CacheMARA3:64003
< Connection: close
<
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
* Closing connection #0

- 61
- 1
- 1
Install Git for windows Then use git bash to run curl commands.

- 527
- 2
- 13
- 24
-
this is a duplicate of this answer: https://stackoverflow.com/questions/2710748/run-curl-commands-from-windows-console/20598096#20598096 – wisbucky Sep 23 '19 at 22:26
-
Install git command line from here. When you install git in windows you will automatically get curl with it. You can check the installed version of curl using curl --version
like this.
This is a sample curl request which sends a string in a JSON object and get it encoded.
curl https://api.base62.io/encode \
--request POST \
--header "Content-Type: application/json" \
--data '{ "data": "Hello world!" }'

- 1,387
- 1
- 20
- 34
I was able to use this site to easily download and install curl on my Windows machine. It took all of 30 seconds. I'm using Windows 7 (w/ Admin privelages), so I downloaded curl-7.37.0-win64.msi from http://curl.haxx.se/download.html.
Also, don't forget to restart your console/terminal after you install curl, otherwise you will get the same error messages.

- 10,627
- 10
- 78
- 117
I have also found that if I put the cygwin bin on my windows path I can run curl from a windows command line. It also will give you access to things like ls and grep

- 79
- 5
-
You can do more than that if the appropriate binaries are in the Cygwin/bin directory! You can even call gcc's compiler options, make, zip, lynx, etc. There are some limitations though, and you would probably want to run windows cmd being elevated to admin privileges, then navigate to your Cygwin or Cygwin64 directory within command prompt then call the Cygwin batch file. However make sure that in your system's property for environment variables under path you set the path to Cygwin64/bin/. Now you can use Unix binaries to run within cmd. – Francis Cugler Apr 25 '18 at 05:26
Assuming you are new to the game or are unable to install software because of security restrictions, you could use Scoop to install curl. From a powershell or command window run the following commands. Note this assumes that you have Powershell v3.0+.
The other cool advantage here is that this installs the software for just the current user.
Set execution exception
Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser
Install Scoop
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
Install curl. You may see a warning about a missing hash, but you should see a final message that cURL was installed successfully
scoop install curl
Test the install of curl
curl -L https://get.scoop.sh

- 14,790
- 5
- 35
- 43
-
1This had the answer I was looking for hidden in plain sight! `iex (new-object net.webclient).downloadstring('https://a.url.here')` to download and run a PS script was just what I needed. – easrng Mar 31 '20 at 12:41
From Windows Command Prompt, run curl through Git Bash
"C:\\Users\\sizu\\AppData\\Local\\Programs\\Git\\bin\\sh.exe" --login -i -c "curl https://www.google.com"

- 2,229
- 25
- 12
- Go to curl Download Wizard
- Select curl executable
- Select Win32 or Win64
- Then select package for it(Eg generic/cygwin) as per your requirement
- Then you will have to select version. You can select unspecified.
- This will directly take you to download link which on click will give you popup to download the zip file.
- Extract the zip to get the executable. Add this folder in your environment variables and you are done. You can then execute curl command from cmd.

- 66,731
- 38
- 279
- 289
Download the .exe file from https://cygwin.com/install.html for cygwin (a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows).
Run the .exe file.
While installing you will get in a step to select packages. In the select package window --> change the view to "Not installed" and search for curl. click on the necessary packages to install by clicking on the "new" column for the package --> you can see the version number and then click next. ( see the image attached below)
After finishing the installation click on the cygwin to open the curl console on windows and work on curl commands.

- 357
- 2
- 9
-
Why do you need that if there a **multiple** answers with a more simple approach? – Nico Haase Mar 27 '18 at 16:07
-
2@NicoHaase Just because an answer is different does not make it necessarily wrong. SO should be about answers, not just what the crowd believes is *only* the best answer...sometimes it is not. I used this and gave it a +1 because it is the current way to install it. – ΩmegaMan Apr 05 '18 at 13:15
-
1@NicoHaase If you are located at point A on a triangle and points B & C are the same distance from point A. You instruct someone to randomly travel to either point B or C first then to travel back to point A but not from the same path you just previously traveled from. Which answer is correct: ABCA or ACBA? As you can see there are more than one valid answers and both are worth the same in the course or path that was taken! – Francis Cugler Apr 25 '18 at 05:13
I am may be bit late for this, but I am able to resolve my issue of curl at cmd for windows 10.
I got help from below video tutorial https://www.youtube.com/watch?v=qlTVMuONazs
Here is some explanation
Step 1: go to https://curl.haxx.se/download.html
Step 2: Search "Win64 - Generic" and download "Win64 x86_64 7zip" by "Darren Owen"
Step 3: unzip the download file and install the certificate "ca-bundle.crt" do not touch curl.exe
Step 4: in windows go to "Control Panel" -> "System" -> "Advance system settings " Step 5: click on Envirnoment variables
Step 6: In System variable click on "Path" and paste the path of the file folder in my case it is "C:\curl\curl_7_53_1_openssl_nghttp2_x64"
And you are done.
Don't Forgot to restart you system for one time

- 602
- 7
- 13
Simplest answer:
(1) Download the curl binary here: https://curl.haxx.se/download.html (see the binary for your OS). Example:
(2) Create a folder "C:\curl" then unzip all there
(3) Edit the system variable called "Path" by adding ";C:\curl\bin" in the end. Finished.
Obs.: I've seen some guys telling to add ";C:\curl" but this way it's not possible to access curl.exe.

- 788
- 9
- 17
I might be late for the thread, since no one mentioned for those who are using latest windows 11 (also 10) they are now shipped with a copy of curl. So you don't need to explicitly download it. You can use it right away. Open the cmd and type curl -help
to verify.

- 21
- 4
For anyone looking for a quick solution, after having standard installed cygwin but finding out curl did not work on a win 10 x64 platform:
Downloading this retired repository, extracting it and running:
git-cmd.bat
Worked like a charm. I assume it has the pre-installed option for curl.

- 2,002
- 3
- 26
- 66