Back to blog

    DevTools

    How to copy as cURL from Chrome DevTools

    Chrome DevTools can export any network request as a curl command, which is useful for debugging API calls and reproducing browser behavior.

    6 min readUpdated 2026-04-28

    Step-by-step instructions

    Open the page you want to inspect, then open DevTools with F12 or Ctrl+Shift+I. Go to the Network tab and reload the page so Chrome records the requests.

    Find the request you care about, right-click it, choose Copy, then choose Copy as cURL. You can paste that command into a terminal, a bug report, or a converter.

    What Chrome includes

    Chrome may include headers, cookies, user-agent values, accept headers, compressed response preferences, and other browser details. That is useful for debugging, but it can also include sensitive information.

    Before sharing a copied curl command, remove cookies, bearer tokens, API keys, session IDs, and private URLs.

    Example copied request

    A copied browser request often looks longer than a hand-written curl command because Chrome tries to preserve the browser request exactly.

    Browser request as curl
    curl "https://api.example.com/me" \
      -H "Accept: application/json" \
      -H "Authorization: Bearer YOUR_TOKEN"

    Turn the copied request into code

    After removing secrets, you can convert the copied curl command into code for your project. This is useful when you want to reproduce a browser request in a script, backend job, test, or integration.

    Try it with curlcode

    Have a curl command already? Paste it into one of the converters below to generate language-specific HTTP request code.

    Frequently asked questions

    Where is Copy as cURL in Chrome?

    Open DevTools, go to Network, right-click a request, then choose Copy > Copy as cURL.

    Why is my copied curl command so long?

    Chrome includes many browser headers so the request can be reproduced accurately.

    Is it safe to share copied curl commands?

    Only after removing cookies, tokens, API keys, and other private values.

    Can I convert copied cURL to Python or JavaScript?

    Yes. After sanitizing secrets, paste the command into a converter and choose your target language.

    Related guides