← Back to Blog

Developers & Code | Published Aug 21, 2026 | Updated Oct 13, 2026 | 6 min read

Browser DevTools Copy Options: Copy as cURL and Beyond

By Deepender Yadav

Browser DevTools Copy Options: Copy as cURL and Beyond — Edge Drop Guide

In Chrome or Edge, open DevTools, go to the Network panel, right-click a request and open Copy. Copy as cURL turns the request into a curl command (on Windows you get a cmd and a bash version), Copy as PowerShell turns it into Invoke-WebRequest, Copy as fetch into JavaScript, and Copy response copies the response body. The "Copy as" options reproduce the request's headers, which usually include your cookies or an Authorization token, so treat what you copied as a credential.

Every item in the Network panel's Copy menu

Microsoft Edge's DevTools are built on the same Chromium code as Chrome's, so the menu is the same in both.

Menu itemWhat lands on the clipboard
Copy URLThe request URL
Copy as cURL (cmd)A curl command quoted for Command Prompt (Windows only)
Copy as cURL (bash)A curl command quoted for bash: Git Bash, WSL, Linux, macOS. On macOS and Linux this is the only cURL option, labelled Copy as cURL
Copy as PowerShellAn Invoke-WebRequest -UseBasicParsing command, with a web session object that carries the cookies and user agent
Copy as fetchA JavaScript fetch() call to run in a browser console
Copy as fetch (Node.js)A fetch() call for Node.js, with the Cookie header written in
Copy as preload elementA <link rel="preload"> tag for the resource
Copy request headers / Copy response headersThe raw header text
Copy responseThe response body (once the request has finished)
Copy stack traceThe JavaScript call stack that started the request, when there is one

Below those, Copy all URLs, Copy all as cURL, Copy all as PowerShell and Copy all as fetch do the same for every request in the log. When a filter is active they become Copy all listed as … and cover only the visible requests. Copy all as HAR (sanitized) copies the whole log as HAR without Cookie, Set-Cookie and Authorization headers; Copy all as HAR (with sensitive data) appears only after you turn on Allow to generate HAR with sensitive data under Settings > Preferences > Network.

Which one to use

You want toUse
Replay the request in Command PromptCopy as cURL (cmd)
Replay it in Git Bash or WSLCopy as cURL (bash)
Replay it in PowerShellCopy as PowerShell
Replay it in the browser console, with the page's cookiesCopy as fetch
Turn it into a Node.js scriptCopy as fetch (Node.js)
Save or inspect the response bodyCopy response
Send a whole session to someone debugging itExport or copy HAR (sanitized)

Copy as fetch doesn't paste your cookies into the code. When the original request sent cookies or an Authorization header, the generated call uses credentials: "include", so the browser attaches the cookies it already has. That's why it works in the console of a logged-in tab and fails elsewhere.

Don't paste the cmd version into PowerShell

The cmd and bash versions quote and escape characters differently, and neither is written for PowerShell. In Windows PowerShell 5.1 there's a second trap: curl is an alias for Invoke-WebRequest, so a pasted curl command runs the wrong program. Use Copy as PowerShell for PowerShell, or Copy as cURL (cmd) in a Command Prompt window. Why pasting into terminals strips formatting covers other surprises when pasting commands.

Remove credentials before you share a copied request

A copied request is often exactly what a teammate or a bug report needs, and it usually carries enough to sign in as you:

  • cURL puts cookies in a -b argument and other headers in -H arguments, including authorization.
  • PowerShell adds each cookie to a $session object before the request.
  • fetch (Node.js) writes the Cookie header into the headers object.

Before you paste one anywhere shared, delete the cookie and authorization lines, or capture the request again while signed in to a test account. For a whole session, use the sanitized HAR. If a live cookie or token already went out, revoke it: sign out to end the session, or rotate the key, as described in what to do after copying an API key. Stack traces, tokens and the clipboard covers redacting logs the same way.

Getting a large response out

Copy response puts the entire body on the clipboard, which is fine for pasting into an editor. For anything big, paste it into a file and share the file instead of the text; how to share large JSON payloads walks through saving, formatting and redacting it. To save the whole log, use the Export HAR (sanitized) button in the Network panel toolbar.

Copy options outside the Network panel

Elements panel

Right-click a node in the DOM tree and open Copy:

  • Copy element and Copy outerHTML copy the node's HTML.
  • Copy selector copies a CSS selector that matches the node.
  • Copy JS path copies a document.querySelector(...) expression for it.
  • Copy styles copies the node's CSS declarations.
  • Copy XPath and Copy full XPath copy a short and a full XPath expression, useful in test automation.

Console

The Console's copy() utility copies a string representation of whatever you pass it. copy($0) copies the element currently selected in the Elements panel. The PowerShell clipboard cheat sheet covers the equivalent on the Windows side.

Firefox

Firefox's Network Monitor has a similar Copy submenu: Copy URL, Copy as cURL, Copy as Fetch, Copy Request Headers, Copy Response Headers, Copy Response and Copy All As HAR, plus Save All As HAR on the context menu.

FAQ

What's the difference between Copy as cURL (cmd) and (bash)?

Only quoting. The cmd version escapes characters the way Command Prompt expects; the bash version uses single quotes and backslash line continuations for Unix-style shells such as Git Bash and WSL.

Does Copy as cURL include cookies?

Yes, if the request sent any. They appear in a -b argument. Remove it before sharing the command.

Why doesn't a copied fetch call work outside the browser?

Browser fetch can't set a Cookie header itself; the generated call relies on the browser's own cookies via credentials: "include". Use Copy as fetch (Node.js) for code that runs in Node.

Related reading

Sources

Deepender Yadav
Written by Deepender Yadav · Creator & Developer

Deepender Yadav created Edge Drop and builds and tests it, from the edge-hover shelf to each release. A B.Tech Computer Science Engineering student, Deepender writes the Edge Drop guides, comparisons and developer posts, and checks product details against the app's source code.

GitHub · LinkedIn

Copy. Stack. Drop.

Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.

Download for Windows Get from Microsoft Store

How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge Drop vs Win+V · Support

Free · Lightweight · Privacy First
Find us on CodeHype