cURL ↔ Fetch Converter
Switch between terminal-ready cURL commands and browser friendly fetch() calls.
cURL Input
fetch() Output
Safe client-side conversionThis tool parses common command and object shapes locally in your browser. It does not execute pasted JavaScript, so complex dynamic fetch wrappers may need a little manual cleanup after conversion.
What this converter handles
It covers the most common API request shapes developers use every day: request methods, headers, JSON payloads, cookies, basic auth, and quick `fetch()` option objects. It is ideal for moving between browser debugging and terminal-based API testing.
How to use
- 1Choose the direction you want: `cURL → fetch()` or `fetch() → cURL`.
- 2Paste your command or request snippet into the left editor.
- 3Review the generated output on the right and copy it with one click.
- 4If your request uses highly dynamic JavaScript, use the generated command as a solid starting point and adjust any custom runtime logic manually.