cURL Parser, Editor & Converter (fetch / PHP)

Paste a curl command to parse it into editable fields (URL, method, headers, cookies, body) and rebuild as curl, JavaScript fetch(), or PHP cURL.

Rebuilt cURL



    

JavaScript fetch()



    

PHP cURL



    

How the cURL Parser & Request Editor Works

When debugging APIs, copying a request from Chrome DevTools (Copy as cURL) often produces a long single-line command packed with dozens of browser headers, tracking cookies, and escaped JSON. This tool parses that raw curl command into structured, editable form fields directly in your browser so you can inspect, modify, or strip individual parts before regenerating a clean request.

What You Can Edit & Export

  • Method & URL: Switch between GET, POST, PUT, PATCH, and DELETE, or tweak query parameters directly in the URL field.
  • Headers Editor: Every -H header is broken into its own key/value row. You can edit any value (such as swapping a Bearer token), add custom headers with + Add Header, or delete noisy browser headers like sec-ch-ua with a single click.
  • Cookies & Body: Flags like -b / --cookie are extracted into a dedicated Cookies field, while -d, --data, and --data-raw populate the Body textarea.
  • Three Output Targets: Every edit updates three synchronized outputs: a clean rebuilt curl command, a modern JavaScript fetch() snippet, and a ready-to-run PHP curl_init() script.

Privacy & FAQ

  • Are my tokens or cookies sent to the server? No. All parsing and code generation run 100% locally in your browser using JavaScript, making it safe to paste authenticated requests containing Authorization headers or session cookies.
  • How do I get a cURL command from Chrome or Firefox? Open DevTools (F12), go to the Network tab, right-click any API request, and select Copy → Copy as cURL (bash). Paste it into the top box and click Parse cURL.
  • Why does fetch() keep cookies in headers? Browser fetch() restricts setting the Cookie header manually for security, while Node.js fetch() allows it. In browsers, use credentials: 'include' instead when targeting same-origin or CORS-enabled endpoints.

Practical Debugging Workflows

A common workflow when reproducing a bug reported by a frontend or mobile client is to paste the DevTools cURL command here, remove noisy browser-only headers (sec-ch-ua, sec-fetch-*, referer), and test whether the API still behaves identically with only Authorization and Content-Type. You can also swap a production base URL for http://localhost:8080, adjust a JSON field in the body, and copy the resulting curl command back into your terminal or convert it directly into a PHP or JavaScript integration test without manually escaping quotes.

Please read the privacy policy (agreement of the cookies usage, other websites embedded content, etc.). If you continue to use the site, we will assume that you agree with our privacy policy.
OkPrivacy Policy