---
title: How to install cURL on windows and how to use it - Inventive HQ
description: "\"Learn how to install cURL on Windows and explore essential commands for file downloads, API requests, and troubleshooting.\""
---

[blog](https://hs.inventivehq.com/blog)

# [How to install cURL on windows and how to use it - Inventive HQ](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it)

 Written by [Sean Conroy](https://hs.inventivehq.com/blog/author/sean-conroy) | Nov 22, 2024 3:33:53 PM

#### **What is cURL?**

cURL is a free, versatile command-line tool used for transferring data with URL syntax, supporting protocols like HTTP, HTTPS, FTP, and more. It is commonly used by developers and system administrators for tasks such as downloading files, making API calls, and testing web services.

While macOS and Linux include cURL by default, Windows users are left to install it manually. Although PowerShell offers cmdlets like `Invoke-WebRequest` that mimic some of cURL’s functionality, users accustomed to Unix tools may find themselves asking: *Where is cURL on Windows?*

This guide will walk you through five different ways to install cURL on Windows and provide examples to help you start using it.

### **Table of Contents**

1. [Why Install cURL on Windows?](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#why-install-curl-on-windows)
2. [How to Install cURL on Windows](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#how-to-install-curl-on-windows) 
     - [Using Chocolatey](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#using-chocolatey)
     - [Downloading Pre-Compiled Binaries](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#downloading-pre-compiled-binaries)
     - [Compiling from Source Code](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#compiling-from-source-code)
     - [Using CYGWIN](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#using-cygwin)
     - [Using Windows Subsystem for Linux (WSL)](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#using-windows-subsystem-for-linux-wsl)
     - [Using Windows Subsystem for Linux (WSL) Without microsoft store](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#WSL-without-store)
3. [How to Use cURL on Windows](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#how-to-use-curl-on-windows)
4. [Practical Examples of cURL Commands](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#practical-examples-of-curl-commands) 
     - [Downloading Files](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#downloading-files)
     - [Fetching Webpage Headers](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#fetching-webpage-headers)
     - [Making POST Requests](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#making-post-requests)
5. [Troubleshooting Common Issues](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#troubleshooting-common-issues)
6. [Summary and Next Steps](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it?hs_amp=true#summary-and-next-steps)

### **Why Install cURL on Windows?**

Installing cURL on Windows opens up a world of powerful command-line operations. It allows you to:

- Automate file transfers.
- Test RESTful APIs.
- Fetch web content and headers.
- Perform advanced network diagnostics.

Windows users can leverage cURL to bridge the gap between Windows and Unix environments, enabling seamless compatibility with cross-platform scripts and workflows.

### **How to Install cURL on Windows**

#### **1. Install cURL using Chocolatey**

Chocolatey is a popular Windows package manager that simplifies software installation.

1. First, install Chocolatey by following the instructions [here](https://chocolatey.org/install).
2. Once installed, open a PowerShell or Command Prompt as Administrator and run the following:

```
choco install curl -y
```

Chocolatey will handle the installation for you, and cURL will be ready to use.

#### **2. Downloading Pre-Compiled Binaries**

For users who prefer manual installation, pre-compiled cURL binaries are available.

1. Visit [cURL’s downloads page](https://curl.se/download.html#Win64).
2. Scroll down to the **Windows** section and download the appropriate binary (e.g., Win64 – Generic).
3. Extract the ZIP file and navigate to the `src` folder to find `curl.exe`.
4. Copy `curl.exe` to a directory in your system’s PATH, such as `C:\Windows\System32`.

You can now access cURL from any command line.

#### **3. Compiling cURL from Source Code** on windows

Compiling cURL from source is an advanced method, ideal for users who need the latest version or want a hands-on learning experience.

1. Download the source code from [cURL’s GitHub repository](https://github.com/curl/curl).
2. Follow the build instructions provided in the [official documentation](https://curl.se/docs/install.html).

This method requires tools like Visual Studio or MinGW for compilation and is recommended only for advanced users.

#### **4. Using CYGWIN**

CYGWIN is a Unix-like environment for Windows that includes many precompiled Unix utilities.

1. Download the CYGWIN installer from [here](https://www.cygwin.com/install.html).
2. During installation, select the **cURL** package from the list of available tools.
3. Complete the installation, then launch the CYGWIN terminal to use cURL.

CYGWIN provides a Unix-like experience on Windows, but it is limited to the tools included in its ecosystem.

#### **5. Install curl on Windows Subsystem for Linux (WSL)**

WSL offers a full Linux environment on Windows, complete with native tools like cURL.

Enable WSL as a Windows feature:

- Open PowerShell as Administrator and run:

```
wsl --install
```

- Install a Linux distribution (e.g., Ubuntu) from the Microsoft Store. 
    - [Ubuntu 18.04 LTS](https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)
    - [Ubuntu 20.04 LTS](https://www.microsoft.com/store/apps/9n6svws3rx71)
    - [Ubuntu 22.04 LTS](https://www.microsoft.com/store/apps/9PN20MSR04DW)
    - [openSUSE Leap 15.1](https://www.microsoft.com/store/apps/9NJFZK00FGKV)
    - [SUSE Linux Enterprise Server 12 SP5](https://www.microsoft.com/store/apps/9MZ3D1TRP8T1)
    - [SUSE Linux Enterprise Server 15 SP1](https://www.microsoft.com/store/apps/9PN498VPMF3Z)
    - [Kali Linux](https://www.microsoft.com/store/apps/9PKR34TNCV07)
    - [Debian GNU/Linux](https://www.microsoft.com/store/apps/9MSVKQC78PK6)
    - [Fedora Remix for WSL](https://www.microsoft.com/store/apps/9n6gdm4k2hnc)
    - [Pengwin](https://www.microsoft.com/store/apps/9NV1GV1PXZ6P)
    - [Pengwin Enterprise](https://www.microsoft.com/store/apps/9N8LP0X93VCP)
    - [Alpine WSL](https://www.microsoft.com/store/apps/9p804crf0395)
    - [Raft(Free Trial)](https://www.microsoft.com/store/apps/9msmjqd017x7)
    - [Alma Linux](https://apps.microsoft.com/search?query=alma+linux)
- Open the Linux terminal and use the `curl` command as you would on a Unix system.
- Install Windows Terminal (optional) 
    - Using Windows Terminal enables you to open multiple tabs or window panes to display and quickly switch between multiple Linux distributions or other command lines (PowerShell, Command Prompt, Azure CLI, etc).
    - [Install Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/get-started).

WSL provides a comprehensive Linux environment but requires additional setup compared to other methods.

#### Install WSL without the Microsoft store

If you are unable to or don’t want to use the Microsoft store, you can also download distributions from here:

- [Ubuntu](https://aka.ms/wslubuntu)
- [Ubuntu 24.04](https://wslstorestorage.blob.core.windows.net/wslblob/Ubuntu2404-240425.AppxBundle)
- [Ubuntu 22.04 LTS](https://aka.ms/wslubuntu2204)
- [Ubuntu 20.04](https://aka.ms/wslubuntu2004)
- [Ubuntu 20.04 ARM](https://aka.ms/wslubuntu2004arm)
- [Ubuntu 18.04](https://aka.ms/wsl-ubuntu-1804)
- [Ubuntu 18.04 ARM](https://aka.ms/wsl-ubuntu-1804-arm)
- [Ubuntu 16.04](https://aka.ms/wsl-ubuntu-1604)
- [Debian GNU/Linux](https://aka.ms/wsl-debian-gnulinux)
- [Kali Linux](https://aka.ms/wsl-kali-linux-new)
- [SUSE Linux Enterprise Server 12](https://aka.ms/wsl-sles-12)
- [SUSE Linux Enterprise Server 15 SP2](https://aka.ms/wsl-SUSELinuxEnterpriseServer15SP2)
- [SUSE Linux Enterprise Server 15 SP3](https://aka.ms/wsl-SUSELinuxEnterpriseServer15SP3)
- [openSUSE Tumbleweed](https://aka.ms/wsl-opensuse-tumbleweed)
- [openSUSE Leap 15.3](https://aka.ms/wsl-opensuseleap15-3)
- [openSUSE Leap 15.2](https://aka.ms/wsl-opensuseleap15-2)
- [Oracle Linux 8.5](https://aka.ms/wsl-oraclelinux-8-5)
- [Oracle Linux 7.9](https://aka.ms/wsl-oraclelinux-7-9)
- [Fedora Remix for WSL](https://github.com/WhitewaterFoundry/WSLFedoraRemix/releases/)

Once the distribution has been downloaded, navigate to the folder containing the download and run the following command in that directory, where `app-name` is the name of the Linux distribution .appx file.

```
Add-AppxPackage .\app_name.appx
```

Once the Appx package has finished downloading, you can start running the new distribution by double-clicking the appx file. (The command `wsl -l` will not show that the distribution is installed until this step is complete).

### **How to Use cURL on Windows**

Once installed, launch the appropriate command-line tool (Command Prompt, PowerShell, CYGWIN, or WSL). To confirm cURL is working, run:

```
curl --help
```

This will display a list of available commands and arguments.

### **Practical Examples of cURL Commands**

#### **1. Downloading Files**

Download a file using the `-O` option:

```
curl -O https://example.com/file.zip
```

#### **2. Fetching Webpage Headers**

Inspect a webpage’s HTTP headers:

- **Linux/WSL/CYGWIN**:bashCopy code`curl -s -D - http://example.com -o /dev/null`
- **Windows PowerShell**:bashCopy code`curl -s -D - http://example.com -o $null`

Linux/WSL/CYGWIN:

```
curl -s -D - http://example.com -o /dev/null
```

Windows PowerShell:

```
curl -s -D - http://example.com -o $null
```

#### **3. Making POST Requests**

Post data to a server:

```
curl -d "key1=value1&key2=value2" -X POST http://localhost
```

Post a JSON file:

```
curl -d "@data.json" -H "Content-Type: application/json" -X POST http://localhost
```

Authenticate with basic credentials:

```
curl -u username:password http://localhost
```

### **Troubleshooting Common Issues** with cURL on windows

- **Command Not Found**: Ensure `curl.exe` is in a directory listed in your PATH.
- **SSL Certificate Errors**: Use the `-k` option to bypass SSL checks (not recommended for production).
- **Installation Fails with Chocolatey**: Run the command as an Administrator.

### **Summary and Next Steps**

This guide covered five ways to install cURL on Windows and provided practical examples to help you get started. Whether you use Chocolatey for simplicity, WSL for a full Linux experience, or another method, cURL is an indispensable tool for developers and IT professionals.

For more advanced use cases, check out the free book [Everything cURL](https://github.com/bagder/everything-curl) and the [official documentation](https://curl.se/docs/).

Have questions or tips? Share them in the comments or explore our other tutorials for mastering command-line tools!

Elevate Your IT Efficiency with Expert Solutions

## Transform Your Technology, Propel Your Business

Unlock advanced technology solutions tailored to your business needs. At Inventive HQ, we combine industry expertise with innovative practices to enhance your cybersecurity, streamline your IT operations, and leverage cloud technologies for optimal efficiency and growth.

[Discover Our Services](https://inventivehq.com/services/)

[View full post](https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Sean Conroy"
  },
  "dateModified" : "2025-01-31T00:09:31.576Z",
  "datePublished" : "2024-11-22T15:33:53Z",
  "headline" : "How to install cURL on windows and how to use it",
  "image" : {
    "@type" : "ImageObject",
    "height" : 682,
    "url" : "https://47453230.fs1.hubspotusercontent-na1.net/hubfs/47453230/Imported_Blog_Media/1518447221_featured-1024x682-1.jpg",
    "width" : 1024
  },
  "mainEntityOfPage" : "https://hs.inventivehq.com/blog/how-to-install-curl-on-windows-and-how-to-use-it",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "blog"
  }
}
```