How to Copy a cURL Command from Your Browser for curlconverter.com

Updated

Open your browser's DevTools, find the request you want in the Network tab, right-click it, and choose Copy → Copy as cURL. Then paste the result into the curl command box on curlconverter.com and pick your target language. The exact menu labels differ slightly between Chrome, Safari, and Firefox, and the copied command can contain cookies or other sensitive data, so treat it as a secret before sharing it.

Chrome: copy a request as cURL

  1. Open the page you want to inspect and open DevTools (F12 or Cmd/Ctrl+Shift+I).
  2. Switch to the Network tab.
  3. Reload or trigger the action that fires the request you care about.
  4. Right-click (or Ctrl-click) the request in the list.
  5. Choose Copy → Copy as cURL (or Copy as cURL (bash)).
  6. Paste it into the curl command box on curlconverter.com.

The same steps work in Safari and Firefox, so once you know the pattern you can reuse it anywhere.

Safari: copy a request as cURL

  1. Enable the Develop menu if it isn't visible, then open the page and its Developer Tools.
  2. Open the Network tab.
  3. Right-click (or Ctrl-click, or two-finger click) the request.
  4. Choose Copy as cURL from the dropdown menu.
  5. Paste it into the curl command box on curlconverter.com.

This also works in Chrome and Firefox.

Firefox: copy a request as cURL

  1. Open the page and its Developer Tools.
  2. Open the Network Monitor tab.
  3. Right-click (or Ctrl-click) the request.
  4. Choose Copy → Copy as cURL.
  5. Paste it into the curl command box on curlconverter.com.

This also works in Chrome and Safari.

What to do after pasting

curlconverter.com converts the pasted command into code for the language you select. The site lists targets including Python + Requests, JavaScript + fetch, Node.js + Axios, Go, Java (HttpClient, HttpURLConnection, jsoup, OkHttp), PHP (cURL, Guzzle), Ruby (Net::HTTP, HTTParty), Rust, Swift, PowerShell (Invoke-RestMethod, Invoke-WebRequest), and many more, plus formats like HAR, HTTP, HTTPie, JSON, and Wget.

A minimal example of the output shape:

import requests

response = requests.get(
    'http://example.com'
)

Use the Copy to clipboard button to grab the generated code. If the syntax looks wrong, the site's own guidance is to open a new issue on GitHub.

Watch out for sensitive data

The copied command may contain cookies or other sensitive data. Sending someone your cookie for a website is like sending them your password, so be careful when sharing the command with other people. If you only need to share the request shape, strip the Cookie header and any tokens first.

Quick reference

Browser Where to find the request Menu path
Chrome DevTools → Network tab Right-click → Copy → Copy as cURL
Safari Developer Tools → Network tab Right-click → Copy as cURL
Firefox Developer Tools → Network Monitor tab Right-click → Copy → Copy as cURL

The copy-as-cURL option in each browser also works in the other two, so the workflow is portable across all three.