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.
Installing cURL on Windows opens up a world of powerful command-line operations. It allows you to:
Windows users can leverage cURL to bridge the gap between Windows and Unix environments, enabling seamless compatibility with cross-platform scripts and workflows.
Chocolatey is a popular Windows package manager that simplifies software installation.
choco install curl -y
Chocolatey will handle the installation for you, and cURL will be ready to use.
For users who prefer manual installation, pre-compiled cURL binaries are available.
src folder to find curl.exe.curl.exe to a directory in your system’s PATH, such as C:\Windows\System32.You can now access cURL from any command line.
Compiling cURL from source is an advanced method, ideal for users who need the latest version or want a hands-on learning experience.
This method requires tools like Visual Studio or MinGW for compilation and is recommended only for advanced users.
CYGWIN is a Unix-like environment for Windows that includes many precompiled Unix utilities.
CYGWIN provides a Unix-like experience on Windows, but it is limited to the tools included in its ecosystem.
WSL offers a full Linux environment on Windows, complete with native tools like cURL.
Enable WSL as a Windows feature:
wsl --install
curl command as you would on a Unix system.WSL provides a comprehensive Linux environment but requires additional setup compared to other methods.
If you are unable to or don’t want to use the Microsoft store, you can also download distributions from here:
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).
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.
Download a file using the -O option:
curl -O https://example.com/file.zip
Inspect a webpage’s HTTP headers:
curl -s -D - http://example.com -o /dev/nullcurl -s -D - http://example.com -o $nullLinux/WSL/CYGWIN:
curl -s -D - http://example.com -o /dev/null
Windows PowerShell:
curl -s -D - http://example.com -o $null
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
curl.exe is in a directory listed in your PATH.-k option to bypass SSL checks (not recommended for production).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 and the official documentation.
Have questions or tips? Share them in the comments or explore our other tutorials for mastering command-line tools!