"Close-up of a curly plant vine symbolizing the functionality of installing and using cURL on Windows."

How to Install cURL on Windows

cURL is a powerful command-line tool for transferring data with URLs. It supports numerous protocols including HTTP, HTTPS, FTP, SFTP, and more. This comprehensive guide will walk you through five different methods to install cURL on Windows, from the simplest to the most flexible approaches.

What is cURL and Why Do You Need It?

cURL (Client URL) is an essential tool for developers, system administrators, and power users who need to:

  • Test APIs and web services
  • Download files from the command line
  • Automate data transfers
  • Debug HTTP/HTTPS connections
  • Send custom HTTP requests with headers
  • Work with RESTful services

Starting with Windows 10 version 1803, cURL comes pre-installed, but you might need a newer version or additional features. Let’s explore all your installation options.

Method 1: Using Pre-installed cURL (Windows 10/11)

The easiest method for Windows 10 (version 1803+) and Windows 11 users is to use the built-in cURL.

Check if cURL is Already Installed

Open Command Prompt or PowerShell and run:

curl --version

If you see version information, cURL is already installed. If not, continue with one of the methods below.

Method 2: Install via Windows Package Manager (winget)

Windows Package Manager provides the simplest installation method for modern Windows systems.

winget install curl.curl

This installs the latest stable version of cURL with automatic PATH configuration.

Method 3: Install via Chocolatey Package Manager

Chocolatey is a popular third-party package manager for Windows that simplifies software installation.

Step 1: Install Chocolatey

First, install Chocolatey by following the official installation guide. Run PowerShell as Administrator and execute:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Step 2: Install cURL

Once Chocolatey is installed, install cURL with:

choco install curl

Chocolatey automatically handles dependencies and PATH configuration.

Method 4: Install via Windows Subsystem for Linux (WSL)

Windows Subsystem for Linux (WSL) provides a full Linux environment on Windows, including cURL and many other Linux tools.

Step 1: Enable WSL

Follow Microsoft’s official WSL installation guide or simply run in PowerShell as Administrator:

wsl --install

Step 2: Install cURL in WSL

Once WSL is installed with your preferred Linux distribution (Ubuntu by default), open WSL and run:

sudo apt update
sudo apt install curl

This gives you access to the full Linux version of cURL with all features.

Method 5: Manual Installation from Official Sources

For maximum control, download cURL directly from the official cURL website or GitHub repository.

Step 1: Download cURL

  1. Visit the cURL for Windows page
  2. Download the appropriate version:
    • 64-bit: Most modern Windows systems
    • 32-bit: Older systems or specific requirements
    • SSL/TLS variant: Choose between OpenSSL, Schannel, or LibreSSL
  3. Extract the ZIP file to a location like C:\curl

Step 2: Add to System PATH

  1. Open System Properties (Win + Pause/Break)
  2. Click “Advanced system settings”
  3. Click “Environment Variables”
  4. Under “System variables”, select “Path” and click “Edit”
  5. Add the cURL bin directory (e.g., C:\curl\bin)
  6. Click “OK” to save

Step 3: Verify Installation

Open a new Command Prompt and verify:

curl --version

Alternative: Install via Cygwin

Cygwin provides a large collection of GNU and Open Source tools on Windows, including cURL.

  1. Download the Cygwin installer
  2. Run the installer and select a mirror
  3. In the package selection, search for “curl”
  4. Select the curl package for installation
  5. Complete the installation

Basic cURL Usage Examples

Once installed, here are some common cURL commands to get you started:

Simple GET Request

curl https://api.example.com/data

Download a File

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

POST Request with JSON Data

curl -X POST https://api.example.com/users \
  -H "Content-Type: application/json" \
  -d '{"name":"John","email":"[email protected]"}'

Include Headers in Request

curl -H "Authorization: Bearer TOKEN" https://api.example.com/protected

Follow Redirects

curl -L https://short.url/link

Save Response to File

curl https://api.example.com/data -o response.json

Troubleshooting Common Issues

‘curl’ is not recognized as an internal or external command

Solution: cURL is not in your PATH. Either:

  • Restart your terminal after installation
  • Add the cURL directory to your PATH manually
  • Use the full path to curl.exe

SSL Certificate Errors

Solution: Update your certificate bundle or use the -k flag (not recommended for production):

curl -k https://example.com

Proxy Configuration

If behind a corporate proxy:

curl -x http://proxy:port https://example.com

Advanced cURL Features

# Save cookies
curl -c cookies.txt https://example.com/login
# Use saved cookies
curl -b cookies.txt https://example.com/protected

Rate Limiting

# Limit download speed to 200K
curl --limit-rate 200K https://example.com/largefile.zip

Multiple Requests

# Download multiple files
curl -O https://example.com/file[1-5].pdf

Useful Resources and Documentation

Conclusion

cURL is an indispensable tool for modern development and system administration. Whether you choose the pre-installed version, a package manager, WSL, or manual installation, you now have multiple paths to get cURL running on your Windows system. Start with basic commands and gradually explore its powerful features for API testing, automation, and data transfer tasks.

For enterprise environments requiring advanced security features, monitoring, or automation capabilities, consider exploring how cURL integrates with your existing DevOps and security toolchains.