Karve app icon

Karve

Blog

How to copy a request as cURL in Insomnia

October 26, 2026 · Pavel, XAKPC Dev Labs

Copy a request as cURL in three steps

  1. In the Insomnia sidebar, right-click the request (or click the ⋯ / dropdown arrow next to its name).
  2. Select Copy as cURL. Some versions ask you to click once more to confirm.
  3. Paste the command into your terminal, a bug report, or a chat.

The command includes the method, URL, headers, auth, and body as Insomnia would send them, with environment variables already filled in. Check it for tokens before you share it.

If "Copy as cURL" is missing or fails

Use the code generator instead: open the request and press Ctrl+Shift+G (⇧⌘G on macOS), or choose Generate Client Code from the same request menu. Pick Shell → cURL and click Copy to Clipboard.

The generator is also the fix when "Copy as cURL" shows a Could not generate cURL error, which some Insomnia releases throw for requests that have scripts attached.

What to do with the cURL command

  • Keep it as a file. Paste it into the cURL → .http converter to get a plain-text request that runs in VS Code REST Client, JetBrains HTTP Client, or Karve, and that you can commit next to your code.
  • Turn it into code. cURL → C#, cURL → JavaScript fetch, and cURL → PowerShell produce ready-to-paste snippets.
  • On Windows PowerShell 5.1, type curl.exe rather than curl, because there curl is an alias for Invoke-WebRequest and rejects curl flags.

All the converters run in your browser. The command you paste is not uploaded.

Many requests? Don't copy them one by one

Copying is fine for a handful of requests. For a whole collection, export it instead. HAR export keeps each request's method, URL, headers, and body, and the HAR → cURL converter turns the whole file into one command per request. The export options are covered in how to export an Insomnia collection, and the full move to text files in how to migrate from Insomnia to .http files.

One-time purchase

Keep your requests as files — give them a workspace.

Karve is a native Windows workspace for the .http files in your repos. $39.99 one-time, with a 15-day free trial.

15-day free trial · No Karve account · No subscription