Convert cURL to PowerShell

    Paste any curl command below and get clean, ready-to-use PowerShell code instantly. Conversion happens entirely in your browser.

    How to copy a curl command from DevTools

    Most browsers can export any network request as a ready-to-paste curl command.

    Chrome / Edge

    1. Open DevTools (F12 or Cmd/Ctrl + Shift + I)
    2. Go to the Network tab and reload the page
    3. Right-click a request → Copy → Copy as cURL

    Firefox

    1. Open the Network Monitor in DevTools
    2. Right-click a request → Copy Value → Copy as cURL
    3. Paste it in the input above

    Safari

    1. Enable the Develop menu in Settings → Advanced
    2. Open Web Inspector → Network tab
    3. Right-click a request → Copy as cURL

    Your data stays in your browser

    We never transmit, store, or log the curl commands you paste. All parsing and conversion happens client-side using JavaScript.

    Watch for secrets

    Curl commands copied from DevTools often contain cookies, bearer tokens, or API keys. Never share converted code without scrubbing those values first.

    Learn more about converting curl to PowerShell

    Background, worked examples, and answers to common questions — the converter above does the work, this section explains how to make the most of the output.

    About converting curl to PowerShell

    Convert curl to PowerShell using `Invoke-RestMethod`, the modern, REST-friendly cmdlet built into PowerShell 5.1 and PowerShell 7+. The generated script handles HTTP methods, headers, JSON bodies, basic and bearer authentication, and SSL options — and `Invoke-RestMethod` automatically deserializes JSON responses into PowerShell objects, so you can pipe results straight into `Where-Object`, `Select-Object`, or `ConvertTo-Json`. This is especially useful on Windows servers where curl behaves differently from the Unix version, or when you're translating API documentation into a PowerShell automation script.

    Output uses

    Invoke-RestMethod

    File extension: .ps1

    How to use the PowerShell output

    1. 1Paste your curl command into the input above.
    2. 2Copy the generated PowerShell snippet — it uses `Invoke-RestMethod`.
    3. 3Open PowerShell (5.1+) or PowerShell 7 — no install required.
    4. 4Paste the snippet directly into the prompt, or save it to a `.ps1` file and run with `./script.ps1`.
    5. 5The response is automatically parsed — pipe it into `ConvertTo-Json` or access fields with dot notation like `$response.id`.

    Common PowerShell examples

    GET request

    Fetch data from a public API endpoint.

    curl
    curl https://api.github.com/repos/curl/curl
    PowerShell
    // generating example...

    POST with JSON body

    Send structured data with the correct content type.

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

    Bearer token authentication

    Pass an API key or OAuth token in the Authorization header.

    curl
    curl https://api.example.com/me \
      -H "Authorization: Bearer YOUR_API_TOKEN"
    PowerShell
    // generating example...

    Common requests — try them in the converter

    See all common PowerShell requests →

    Click any example to load it into the converter at the top of the page and instantly see the PowerShell output.

    Frequently asked questions about curl to PowerShell

    Related conversions

    Coming soon

    Features we're building next to make curlcode the most useful tool in your dev workflow.

    AI Explanation

    Soon

    Plain-English breakdown of headers, auth, body, and what the request actually does.

    Fix my curl

    Soon

    AI-assisted repair for malformed curl commands and quoting issues.

    Reverse conversion

    Soon

    Paste fetch, axios, or Python requests code and get the equivalent curl back.