616

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.

Syscall
  • 16,959
  • 9
  • 22
  • 41
pri_dev
  • 10,215
  • 15
  • 65
  • 118
  • 4
    Would you consider a request to change the accepted answer to stackoverflow.com/a/16216825/700206? It's not mine, I get no riches, but spent time trying to significantly improve and modernize it and believe your change could help users. Thank you... – whitneyland Nov 21 '17 at 19:28
  • 19
    With Windows 10 build 1803 (released early May 2018), you don't install curl. It is in `C:\Windows\System32` directly! See [my answer below](https://stackoverflow.com/a/50200838/6309). – VonC May 06 '18 at 14:35
  • Easiest way is install git and you have it (https://stackoverflow.com/questions/2710748/run-curl-commands-from-windows-console/20598096#20598096) – BRogers Nov 20 '18 at 20:52
  • @VonC do you know how to turn of the built-in version and run a newer version? The Microsoft version doesn't support sftp. – Frank Chen May 27 '20 at 21:08

22 Answers22

1068

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.

  • If you have Git for Windows installed (if you downloaded Git from git-scm.com, the answer is yes), you have curl.exe under:

     C:\Program Files\Git\mingw64\bin\
    

    Simply add the above path to PATH.

Installing curl with a package manager

If you are already using a package manager, it may be more convenient to install with one:

new Cygwin installer design

Installing curl manually

Downloading curl

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.

Instead, click the large and prominent download links on this page. Those are the official Windows builds, and they are provided by the curl-for-win project.

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

Find curl.exe within your downloaded package; it's probably under bin\.

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, C:\Program Files\curl\ or C:\curl\ will do.
  • 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:\Program Files\tools\ or C:\tools\ for the purpose.

Place 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:

  1. Click the Windows 10 start menu. Start typing "environment".
  2. You'll see the search result Edit the system environment variables. Choose it.
  3. A System Properties window will popup. Click the Environment Variables button at the bottom.
  4. Select the "Path" variable under "System variables" (the lower box). Click the Edit button.
  5. Click the Add button and paste in the folder path where curl.exe lives.
  6. Click OK as needed. Close open console windows and reopen, so they get the new PATH.

Now enjoy typing curl at any command prompt. Party time!

questionto42
  • 1,420
  • 1
  • 10
  • 30
Michiel van Oosterhout
  • 22,190
  • 14
  • 84
  • 123
  • 14
    Thanks - Also, my Win64 installation of Curl added it to the PATH variable, so simply installing it will make it available on the command line. No need to copy into %windir%. It will also be available in Powershell – ndhar Apr 24 '14 at 14:33
  • 3
    Very simple just need to download from [here](http://a2znotes.blogspot.in/2015/02/install-and-configure-curl-on-windows.html) install with one click and configure following this tutorial. – RN Kushwaha Feb 21 '15 at 18:15
  • 6
    Please, read [Daniel's comment](http://stackoverflow.com/questions/9507353/how-do-i-install-set-up-and-use-curl-on-a-windows#comment32976065_19081903) to another answer. It is an awful approach to put things into windows or system directories while there is far more civilized way. Do not pollute your windows installation, rather use the PATH variable, it is what it is intended for any way. – Ivaylo Slavov Jul 30 '15 at 20:09
  • 4
    What do you mean copy into %windir%, and it seems that they're not exe they're files of another format, thanks. – Henry Zhu Apr 23 '16 at 05:28
  • @HenryZhu - The system32 folder in windows. But, it seems that its better to put it some other folder and then add that folder to your windows path variable. – MasterJoe Feb 04 '17 at 01:15
  • Why can't I just install cygwin instead and then install curl in cygwin ? – MasterJoe Feb 04 '17 at 01:17
  • 6
    I took the curl.exe by "Marc Hörsken". The curl.exe we need is located in the src folder. Src is source. Weird. Can i trust these exe files ? – MasterJoe Feb 04 '17 at 01:28
  • 2
    Obtuse, long-winded download process, needlessly requiring 7zip, including the .exe in the "src" folder. You can tell the curl community hasn't ever made anything for non-dev users before :). – Josh Noe Apr 08 '17 at 17:38
  • some links are outdated, and the exe file is now in the `bin` folder – robotik Jun 27 '17 at 06:53
  • 1
    @robotik This is a community answer, so please feel free to edit the answer so that it reflects any changes made to the curl website since. Thanks! – Michiel van Oosterhout Jul 08 '17 at 08:46
  • @MichielvanOosterhout everything should now be modernized. updates for win10, outdated links, optimized steps, clarifications, etc. – whitneyland Nov 19 '17 at 21:05
  • Also when entering the PATH location leave out the `curl.exe`. For example `C:\program files\curl\src` - that worked for me. – TheOrdinaryGeek Apr 09 '18 at 14:48
  • 2
    Note that depending on your PowerShell version (I have 5.1), `curl` may still be aliased to `Invoke-WebRequest`. To make it use the one from your path, simply remove the alias : `rm alias:curl` – Yann39 May 19 '18 at 18:49
  • Built in Windows 10 version of curl [7.55.1 in my case] is buggy. Command `echo.ěšččřžýáíé| curl -Gs -w %{url_effective} --data-urlencode @- ""` give different output almost every time its run with chcp 852 – user2956477 Nov 11 '20 at 22:58
272

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.

Daniel Stenberg
  • 44,219
  • 12
  • 115
  • 175
theglauber
  • 25,525
  • 7
  • 27
  • 45
  • 1
    so I need to go to which location in the unzip directory to run curl "url here"? – pri_dev Feb 29 '12 at 23:38
  • 22
    Was there a curl.exe file there? Run that. Alternatively, copy curl.exe that and any files that have .dll extension to a directory that is included in your PATH environment variable (or add the directory where curl.exe and the .dll files are, to your PATH environment), and you won't have to type the full pathname to curl.exe in order to run it. – theglauber Mar 01 '12 at 15:33
  • Thanks I will be trying it out – pri_dev Mar 02 '12 at 21:07
  • 11
    @theglauber, the question is "where is that curl.exe"? I've downloaded `.tar.gz`, unpacked it with zip and there is no any `curl.exe`. – Green Mar 14 '13 at 11:08
  • 10
    Maybe you are downloading a source distribution instead of a binary one. – theglauber Mar 15 '13 at 16:26
  • 27
    When I unzipped the downloaded curl file "curl-7.47.1.zip", I didn't find any curl.exe – Yash Saraiya Feb 09 '16 at 13:59
  • 7
    Yash, you probably downloaded a source archive. Look lower in the download page, under "packages", find the section for 32 or 64-bit Windows (win32 - generic or win64 - generic) – theglauber Feb 11 '16 at 19:48
  • 2
    re: comment from @YashSaraiya The things labeled "binary win64" on the downloads page are currently source archives. This is still true as of v7.50.1 The curl.exe in my version was , helpfully, located under the src directory. – Cheeso Aug 08 '16 at 21:26
  • 4
    @Cheeso: I have made the same observation for one of the downloads, but the release by Viktor Szakáts now contains a `bin` directory. Makes things a bit easier. – O. R. Mapper Aug 26 '16 at 07:53
  • Thanks @O.R.Mapper , helpful! – Cheeso Aug 29 '16 at 23:43
  • 1
    dbl-arg! for the `7.50.3` release, the `curl.exe` has moved to (very intuitively ;-/ ) `./src/.libs` dir. Arg!!! Now let me see if it actually works. `libssh2*.dll` not found. Oh Joy! Good luck to all. – shellter Sep 22 '16 at 15:55
  • Well, didn't want to spend extra time searching to install `libssh2*.dll`, as who knows what other dependencies will then surface. Went with @confusedbycode 's solution below. See comments there. Good luck to all! – shellter Sep 22 '16 at 17:21
  • @O.R.Mapper great help thanks. Should I need admin rights to execute? – MyFamily Mar 07 '17 at 16:23
  • 3
    Would you consider a request to change the accepted answer to https://stackoverflow.com/a/16216825/700206? It's not mine, I get no riches, but spent time trying to significantly improve and modernize it and believe your change could help users. – whitneyland Nov 19 '17 at 21:08
  • 2
    @Lee - yes, things have changed a lot since the question, and https://stackoverflow.com/a/16216825/700206 is now the correct answer. But i don't think i can change the accepted answer, because i wasn't the questioner. – theglauber Nov 21 '17 at 15:42
  • Oh, so you think people here should pay attention to whether they are looking at an answer or a question? :-) My mistake, thanks for your reply. – whitneyland Nov 21 '17 at 19:27
  • @theglauber, you are showing how to install a cURL binary in windows environment. How do you install curl.dll library within the apache/php ecosystem? I have php-curl.dll in my /ext/ folder and modified my php.ini to enable 'extension=curl'; however, I still can not load the .dll. are there any tricks to it? – JavaFan Feb 01 '18 at 15:21
  • 2
    @Cheeso: The Win64 Generic release by Marc Hörsken, version 7.59.0, has no `bin` directory but does have a `src` directory containing `curl.exe`. Copying it to a directory in my path worked. But then, in order to get HTTPS sites to work, I needed to follow the instructions [here](https://superuser.com/a/442797/346319) (place a cert bundle named `curl-ca-bundle.crt` alongside the `.exe`). – George Apr 22 '18 at 02:32
  • 1
    [enter link description here]For anyone looking cURL, and Tar, are now included in Windows 10 in Spring update the [Spring 2018 Update](https://blogs.technet.microsoft.com/virtualization/2017/12/19/tar-and-curl-come-to-windows/) – hoss May 02 '18 at 03:49
  • Checkout here: https://curl.haxx.se/windows/ You'll see curl.exe and libcurl dll on `bin/` folder. – adembudak Aug 24 '20 at 13:32
106
  1. Download curl zip
  2. Extract the contents (if you have downloaded the correct version you should find curl.exe)
  3. Place curl.exe in a folder where you keep your software (e.g. D:\software\curl\curl.exe)
  4. 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:

curl www.google.com
Ithar
  • 3,186
  • 3
  • 30
  • 35
  • Thanks for the *Environment Variables* suggestion, I was specifically searching for how do I create a persistent command line alias for `curl` – aexl Sep 10 '16 at 09:53
31

The simplest tutorial for setting up cURL on Windows is the Making cURL work on Windows 7. It only have 3 easy steps.

Abel Callejo
  • 10,079
  • 7
  • 50
  • 64
  • 24
    This tutorial suggest placing curl.exe in the System32 folder. One should really create a Curl folder in C:\Program Files, put the Curl executable there, and then put that folder's path into the system path environmental variable. This will still allow it to be accessed from the command prompt in any location – Daniel Feb 15 '14 at 05:23
30

Starting with Windows 10 version 1803 (and earlier, with insider build 17063), you don't install curl anymore. Windows includes a native curl.exe (and tar.exe) in C:\Windows\System32\, which you can access right from your regular CMD.

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

See the initial announcement and the release announcement.

MultiplyByZer0
  • 4,341
  • 3
  • 27
  • 46
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • Hi @VonC, As you said It is in the C:\Windows\System32\curl.exe in my system. But If I want to use it in my TFS server pipeline with the task "cURL" - It is showing error for demanded curl is not there in the Build Agent. I have restarted vsts Agent ,but no luck. am I missing something ? – Darshana Patel Sep 06 '19 at 05:09
  • @DarshanaPatel Can you request your Agent to print its `%PATH%` environment variable? Also, what is the exact error message? – VonC Sep 06 '19 at 06:06
  • Hi @Vonc ,path C:\WINDOWS\system32; is there in the path. Also, I have tried print curl --version from agent and output is -->curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL 2019-09-08T08:14:52.864977 Release-Date: [unreleased] 2019-09-08T08:14:52.86618Z Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp. – Darshana Patel Sep 08 '19 at 08:22
  • And yes Error I am getting while running task "cURL" is --> C:\WINDOWS\system32\curl.exe failed with return code: 26 curl failed with error: C:\WINDOWS\system32\curl.exe failed with return code: 26 – Darshana Patel Sep 08 '19 at 08:45
  • It works now as I was trying to upload a folder instead of a .nupkg file. – Darshana Patel Sep 08 '19 at 09:10
  • @DarshanaPatel OK, well spotted. – VonC Sep 08 '19 at 18:33
  • 3
    Just be aware that Microsoft doesn't seem to be keeping curl up to date, so you should still use the latest version with all the security fixes/patches. – Darian Miller Dec 19 '19 at 17:51
  • 1
    Does any one know if Microsoft has an option to turn it off like for telnet. Being in System32 the Microsoft version is ran first even if i have a version in path. – Frank Chen May 27 '20 at 21:05
  • @FrankChen I don't think so: I always launch a script which will set my own PATH: I can therefore put any folder I want *in front of* (before) the `C:\Windows\System32` one. – VonC May 28 '20 at 05:04
  • @VonC thanks. I'll investigate to see if i can find a better solution that overwriting the one in System32. For my context i need to read specific cert to connect in a secure transaction. – Frank Chen May 28 '20 at 13:07
28
  1. Download cURL (Win64 ia64 zip binary with SSL)
  2. Extract curl.exe into "C:\Windows\System32"
  3. Done

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.

Benny Neugebauer
  • 40,817
  • 21
  • 196
  • 177
  • 3
    Excellent Answer... @benny It is working for me as well.. **But don't forgot to restart your PC.** – Krupal Patel Feb 08 '18 at 13:07
  • That doesn't work for me. Curl needs SSL certificates (curl-ca-bundle.crt) in addition to the curl.exe file, so you should put the contents of the bin folder somewhere (I just left it in my downloads directory, but `C:\Program Files\curl` would be better), then add that folder to your path. – Dave Jul 19 '19 at 20:40
18

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

MultiplyByZer0
  • 4,341
  • 3
  • 27
  • 46
user2233949
  • 1,615
  • 17
  • 20
12

Note also that installing Git for Windows from git-scm.com also installs Curl. You can then run Curl from Git for Windows' BASH terminal (not the default Windows CMD terminal).

RBV
  • 1,129
  • 1
  • 10
  • 25
  • Easiest way I've found of doing this, especially behind a corporate firewall. Also: deployed as part of Visual Studio installation these days? – Tim Barrass May 15 '19 at 08:59
11

As you already know, you can find several packages of binaries on the official curl website.

Once you download a package, unzip it wherever you want. I recommend adding its location to your path, so you can call curl from batch or powershell scripts. To add a directory to your path type "environment variables" in the start menu, and select "edit user environment variables". Select Path, and add to the end of the "value" box: ;C:\curl\directory (with the directory changed to where you saved curl.)

If you want to use SSL you need a certificate bundle. Run either mk-ca-bundle.pl (perl) or mk-ca-bundle.vbs (VBScript). Some of the packages of binaries include one or both of them. If your download doesn't include one, download one here: https://github.com/bagder/curl/tree/master/lib. I recommend mk-ca-bundle.vbs, as on windows you simply double click it to run it. It will produce a file called ca-bundle.crt. Rename it curl-ca-bundle.crt and save it in the directory with curl.exe.

Alternatively, I recently developed an msi installer that sets up a full featured build of curl with just a few clicks. It automatically ads curl to your path, includes a ready-to-use ssl certificate bundle, and makes the curl manual and documentation accessible from the start menu. You can download it at www.confusedbycode.com/curl/.

Shadow The Vaccinated Wizard
  • 62,584
  • 26
  • 129
  • 194
ConfusedByCode
  • 1,107
  • 8
  • 24
  • As an FYI to readers that use the download here, A. It scanned as clean by McAfee (yes, well, meh, McAfee, but I've been using it for years and haven't had a problem) ... B. Consider going with the paid solution right away. only $3. (I would have if I had noticed the price sooner (and had a hint of what lay ahead) ). C. if you go with the free version you're getting a slightly older version (OK for my purposes). D. You have to 'prove you're not a robot' by playing a captcha game I have never seen before. Started out having to multiple-select pics of houses. . . . . . – shellter Sep 22 '16 at 17:49
  • . . . That didn't seem to work, so do the more generic buildings in the set of pics need to be selected as well? Eventually got cycled thru more ambiguous picture sets with similar problems and finally wound up on "select squares that have street signs in them". These proved unambiguous, I passed the "not a robot test" and was able to download the installer. E. Ran the installer as Admin on my machine. F. The install required installing MS Visual C++ for 2015 Redistributable. Had to launch that 2x, but I'd bet is was a MS hickup on their end on the download .... – shellter Sep 22 '16 at 18:15
  • .... G. Oh yeah, on the captcha thing, I hit the download button before I noticed the check box for 'I am not a robot'. I think because I tried to download first, even though I later checked the box, I was forced to do the captcha as well. Hopefully others can avoid this. H. Over all, very happy with this package and will be getting the update (assuming I can use paypal). Thanks @confusedbycode, this was much easier than searching for libssh2*.dll (and other too be later discovered dependencies from the "official" download (see above). Good luck to all! – shellter Sep 22 '16 at 18:20
  • H. Installed the "professional edition" expecting to be about to use "auto-updates and Easy SFTP" but don't see that in the `C:/program files/Confused By Code' directory structure. (I know this isn't be place for tech support, just finishing off my experience with this solution). Good luck to all! – shellter Sep 22 '16 at 20:42
11

Install Chocolatey package manager for Windows. Once installed, simply enter choco install curl. Then you can use curl from a terminal.

Dzmitry Lahoda
  • 827
  • 1
  • 11
  • 33
Adam
  • 6,140
  • 10
  • 41
  • 80
8

Thought I'd write exactly what I did (Windows 10, 64-bit):

From the download page https://curl.haxx.se/download.html choose the download wizard https://curl.haxx.se/dlwiz/

Choose curl executable.

Choose Win64.

Choose generic.

Choose any.

Choose x86_64.

Choose the first recommended option. For me this was:

curl version: 7.53.1 - SSL enabled SSH enabled. Provided by: Viktor Szakáts. This package is type curl executable You will get a pre-built 'curl' binary from this link (or in some cases, by using the information that is provided at the page this link takes you). You may or may not get 'libcurl' installed as a shared library/DLL. The file is packaged using 7zip. 7zip is a file archiving format.

Click download.

You should have the file curl-7.53.1-win64-mingw.7z in your downloads folder.

Install 7-Zip if you don't have it.

Right-click, 7-Zip, Extract Here. Copy and paste the extracted file somewhere like Z:\Tools\

If you look in the bin folder you'll see curl.exe. If you double-click it a window will quickly flash up and vanish. To run it you need to use the Command Prompt. Navigate to the bin folder and type curl followed by your parameters to make a request. You must use double-quotes. Single quotes won't work with curl on Windows.

Now you'll want to add curl to a user's Path variable so you don't have to navigate to the right folder to run the program. Go to This PC, Computer, System Properties, Advanced system settings, authenticate as an administrator (you're not running as admin, right? Right?) Environment Variables, System variables, look at the list and select Path, then Edit, then New, then, e.g.

Z:\Tools\curl-7.53.1-win64-mingw\bin

You can add a trailing backslash if you like, I don't think it matters. Click move up until it's at the top of the list, then you can see it easily from the previous screen. Click OK, OK, OK, then crack open a Command Prompt and you can run curl by typing curl from any folder, as any user. Don't forget your double-quotes.

This is the answer I wish I'd had.

nmit026
  • 2,328
  • 19
  • 45
7

You can build the latest version of curl, openssl, libssh2 and zlib in 3 simple steps by following this tutorial.

Curl is built statically so you do not have to distribute the prerequisite dynamic runtime.

You can also download a prebuilt version (x86 and x64) from SourceForge.

7

I had a lot of issues with curl for Windows. I finally used Cygwin, which includes curl by default.

cprcrack
  • 14,411
  • 6
  • 75
  • 83
  • I had to manually set the "net" package to Install, so that it would install cURL. This is during the cygwin install wizard – Janac Meena May 11 '17 at 14:06
6

I was looking for the download process of Curl and every where they said copy curl.exe file in System32 but they haven't provided the direct link. so here it is enjoy, find curl.exe easily in bin folder just

unzip it and then go to bin folder there you get exe file

link to download curl generic

Pre_hacker
  • 1,254
  • 1
  • 16
  • 20
5

This installer made it easy for me http://www.confusedbycode.com/curl/

The link describes how to use it. Here's a summary taken from the website above:

"You can install cURL for Windows with only a few clicks. Just download and run an installer from the table below, and click Install. The default installation includes:

  1. curl.exe
  2. an SSL certificate bundle (ca-cert-bundle.crt)
  3. SSL certificate bundle generation scripts (mk-ca-bundle.pl & mk-ca-bundle.vbs)
  4. HTML manuals for cURL and libcurl
  5. text documentation formatted for Windows (so you can simply double click the files to read them with Notepad)
  6. Start Menu folder with shortcuts to the cURL installation folder, manuals, documentation, and uninstaller
  7. cURL added to your path, so you can use it with batch or PowerShell scripts and call it from the command prompt in any working directory

To include developers' files in your installation, click Advanced. The developers' files include libcurl.dll, libeay32.dll, ssleay32.dll, libssh2.dll, zlib.dll, msvcr120.dll, C headers, libs, and code examples.

When you click Advanced you can also choose whether or not to install the documentation and manuals, and whether or not to add cURL to your path.

If you don't have administrator privileges on your computer, use one of the files from the "Without Administrator Privileges" row. These install cURL in C:\Users\Name\AppData\Local\Apps.

If you do not want to use the installer, but still want the contents listed above, you can download one of the zip archives."

Matt
  • 21,449
  • 14
  • 100
  • 149
Aussie Ash
  • 1,103
  • 11
  • 9
  • I still had to manually copy the .exe and .dll files to my windoze dir, – MarkHu Aug 11 '16 at 06:48
  • 1
    The Path variable option under advanced should have taken care of that. Tho that would not work for background services running as local system or as another user – Aussie Ash Aug 12 '16 at 02:37
3

Just download curl and extract the compressed file. You will get the file "curl.exe". Open a CMD Shell, drag the file curl.exe into the CMD Shell, now you can use curl.

enter image description here

Black
  • 12,789
  • 26
  • 116
  • 196
  • 3
    This answer is technically correct, answers the questions, and in fact the easiest way to explain it to newbies. It is not clear what the downvotes are for. Perhaps the only part to add to address the question directly is - `you don't _need_ to "install" it if you make sure you download the binary instead of the source code.` – Amit Naidu Mar 04 '16 at 23:46
3

After adding curl.exe's path to the System Variable 'Path'

you can open command prompt and run 'curl -V' to see if it is working.

Shreyas
  • 789
  • 5
  • 17
  • note for readers: it's a capitalized V for the version, the lower case v is for version. to be safe type curl.exe --version Also note the version and the protocols of your version. – Frank Chen May 28 '20 at 13:12
3

Follow download wizard

Follow the screens one by one to select type of package (curl executable), OS (Win64), flavor (Generic), CPU (x86_64) and the download link.

unzip download and find curl.exe (I found it in src folder, one may find it in bin folder for different OS/flavor)

To make it available from the command line, add the executable path to the system path (Adding directory to PATH Environment Variable in Windows).

Enjoy curl.

1

Statically built WITH ssl for windows:

http://sourceforge.net/projects/curlforwindows/files/?source=navbar

You need curl-7.35.0-openssl-libssh2-zlib-x64.7z

..and for ssl all you need to do is add "-k" in addition to any other of your parameters and the bundle BS problem is gone; no CA verification.

Patrice
  • 4,562
  • 9
  • 30
  • 41
Beeb
  • 21
  • 5
1

I have successfully used Windows curl-installer: http://open-edx-windows-7-installation-instructions.readthedocs.io/en/latest/6_Install_cURL_for_Windows.html

by using cURL for Windows direct download link with msi-installer. Remember to reboot your system after installing.

Kirill Ch
  • 3,978
  • 3
  • 34
  • 59
1
  • Download curl for windows from the path : https://curl.haxx.se/windows/
  • Unzip and you will find the ..\bin\curl.exe
  • Add ...\bin\ to your path variable for easy global access
Vikash
  • 1,730
  • 2
  • 16
  • 28
0

I followed @theglauber's answer (the most popular one) but on Windows 10 Terminal / PowerShell the Environment setting did not take effect.

I had to CD into the GIT location and also use .\ like below:

PS C:\Program Files\Git\mingw64\bin> .\curl -X POST https://6sl8yohih.execute-api.us-west-1.amazonaws.com/dev/hello

I did not have any issues on the regular command prompt though.

Just posting this as an answer for someone who might be struggling as I did.

oneworld
  • 719
  • 4
  • 17
  • 29