Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

To copy a Firefox network request as cURL: open Developer Tools with Ctrl+Shift+E on Windows/Linux or Cmd+Option+E on macOS, select Network, reproduce the request, right-click its row, and choose Copy → Copy as cURL. Paste the generated command into a terminal, then remove or replace secrets before you save or share it.

What “Copy as cURL” does

Firefox’s Network Monitor records HTTP requests made while the toolbox is open. The export is built into Firefox Developer Tools; you do not need an extension or to inspect page source. Firefox builds a command that mirrors the selected request, including its method, URL, headers, and body where those details were captured.

The result is useful for reproducing an API call in a shell, documenting an integration, importing a request into another API client, or giving a developer a precise example of what the browser sent. It is a snapshot of one request, not a promise that the same command will keep working after cookies, tokens, timestamps, or server-side state expire.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Copy one request as cURL

  1. Open Network Monitor before doing anything

    Open Firefox Developer Tools and choose Network. Use Ctrl+Shift+E on Windows or Linux, or Cmd+Option+E on macOS. Monitoring starts when the tool opens, so opening it after the click or form submission is too late.

  2. Preserve requests across a reload

    If the request occurs during navigation, enable Persist Logs in the Network Monitor options before reloading. Firefox clears the request list on navigation or reload by default; persistence keeps the earlier rows available for inspection and copying.

  3. Trigger the request

    Load the page, submit the form, click the control, or perform the action that calls the API. If the list is busy, use the filter box and type part of the URL, endpoint name, or other search text. You can also filter by request type.

  4. Confirm the correct row

    Use the method, URL, status, and type columns to distinguish the request you need from preloads, analytics calls, redirects, options requests, and static assets. Select the row to open its details pane. Check Headers, Request, Response, Timings, Security, and, when available, Stack trace.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Copy the command

    Right-click (or context-click) the request row and choose Copy → Copy as cURL. Firefox places the command on your clipboard. Paste it into a terminal, a text editor, a shell script, or an API client import field.

  6. Review before running or sharing

    Read the URL, method, body, cookies, authorization headers, CSRF values, and other request-specific data. Replace live credentials with environment variables or redacted values before committing the command or sending it to anyone.

What Firefox puts in the command

The exact syntax depends on the captured request. Firefox may include:

  • -X METHOD when the method is not GET or POST.
  • --data for URL-encoded parameters.
  • --data-binary for multipart parameters or binary request data.
  • --http/VERSION when the captured HTTP version is not 1.1.
  • -I for a HEAD request.
  • One -H option for each captured request header.
  • --compressed when Firefox captured an Accept-Encoding header.
  • --globoff when the URL contains square brackets.

A copied POST therefore commonly contains a URL, a method or body option, and many headers. A GET may be little more than a URL plus headers. Do not assume that every visible browser detail becomes a command option; the export reflects what Firefox captured for that row.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run and adapt the exported command safely

Run it once in a terminal

Paste the command into your shell and press Enter. If it spans several lines, preserve the continuation characters and quoting that Firefox supplied. A successful HTTP response does not necessarily mean the application accepted the operation: inspect the status code and response body.

Move secrets into environment variables

Instead of leaving a token in shell history, edit the command to use a variable:

export API_TOKEN='replace-me'
curl 'https://api.example.test/v1/items' 
  -H "Authorization: Bearer $API_TOKEN"

The host and endpoint above are illustrative; keep the URL from your captured request when adapting your own command. On shared machines, also consider shell history, process listings, CI logs, and terminal recordings.

Expect stateful values to expire

Cookies, CSRF tokens, one-time nonces, signed URLs, timestamps, and short-lived authorization tokens can make a copied command fail later. Re-capture the request or obtain a fresh token rather than weakening security checks. A browser request can also depend on a preceding login, a session cookie, or a server-side workflow that the single command does not reproduce.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check headers before deleting them

Some headers are essential to routing or authentication; others describe the browser and can be removed for a cleaner test. Change one thing at a time and compare the response. Keep the original export untouched so you can return to a known capture.

When one cURL command is not the right export

Need Firefox action What you get
Reproduce one request Right-click row → Copy → Copy as cURL A command for the selected request
Capture many requests in a structured file Network Monitor controls → Copy All as HAR or Save All as HAR A HAR archive containing the recorded session
Change and resend one request inside Firefox Open the request’s Headers view → Edit and Resend An editable request with changed method, URL, headers, or body

Choose the single-command export when a developer needs one reproducible call. Choose HAR when the context is a multi-request page load or debugging session. Choose Edit and Resend when the goal is an immediate, controlled variation rather than a terminal script.

Common problems and fixes

No request appears

Cause: Network Monitor was opened after the action, or the action did not reach the network. Fix: open Network first, repeat the action, and check that filters are not hiding the row. Look for redirects, preflight requests, and the final endpoint rather than assuming the first row is the API call.

The request disappeared after reload

Cause: Firefox clears the list on navigation or reload by default. Fix: enable Persist Logs before reproducing the flow again.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The copied command is for the wrong call

Cause: pages often generate several similar requests. Fix: compare method, full URL, status, and type, then verify the details pane’s request headers and body before copying.

The command returns unauthorized or forbidden

Cause: an authorization header or cookie expired, a CSRF value is stale, or the request requires a login sequence. Fix: authenticate again, capture a fresh request, and identify which value changes. Do not publish the captured credential.

The server rejects the body

Cause: multipart boundaries, encoding, content type, or binary data were altered while editing. Fix: start with Firefox’s untouched command, preserve --data-binary when present, and compare the exported headers and request payload with your edited version.

The URL behaves strangely in the shell

Cause: shell quoting or square brackets in the URL. Fix: retain Firefox’s quoting and --globoff option when it supplied one. Do not paste an unquoted URL containing shell metacharacters.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You need to edit before sending

Use Edit and Resend in the Headers view when you want Firefox to change the method, URL, headers, or body and send the request again. Use Copy as cURL when the destination is a terminal or script.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security and reproducibility checklist

  • Redact Cookie, Authorization, API keys, CSRF tokens, signed URLs, and personal data before sharing.
  • Use a test account and non-production endpoint for demonstrations whenever possible.
  • Check whether the request changes server state before running it twice.
  • Record the capture date, required login state, relevant headers, and expected response so another developer knows its limits.
  • Prefer environment variables or a secret manager in scripts and CI.
  • Keep a raw export privately and a sanitized example publicly; never mix the two.

Or skip the browser setup

If your real goal is a clean image or PDF of a web page rather than replaying its HTTP call, ScreenshotNeo provides a website screenshot API and MCP server. Its one-call endpoint accepts a URL and returns PNG, JPEG, WebP, or PDF:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for parameters and response details. Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status with X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing provides two months free, and every feature is included on every plan. Sign up free for ScreenshotNeo.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Practical decision guide

  • One API call for a terminal: Copy as cURL.
  • A full browser session: Copy All as HAR or Save All as HAR.
  • A modified request inside Firefox: Edit and Resend.
  • A screenshot or PDF without maintaining browser automation: use ScreenshotNeo’s API or MCP tools.

Frequently Asked Questions

Does Firefox need an extension to copy a request as cURL?

No. Copy as cURL is part of Firefox Developer Tools’ Network Monitor.

Can I copy a request that already happened before DevTools opened?

Usually not; monitoring begins when Network Monitor opens. Reopen it, enable Persist Logs if needed, and reproduce the action.

What is the difference between Copy as cURL and a HAR file?

Copy as cURL exports one request as a command. A HAR export preserves a structured collection of recorded requests for a session.

Why does a copied command work once and then stop working?

The request may contain expiring cookies, tokens, nonces, timestamps, or server-side state. Capture a fresh request and avoid treating the command as a permanent credential.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.