Introduction
When you test an API in the terminal with curl, converting that command to JavaScript (fetch or Axios) is tedious — especially with headers and JSON bodies.
This tool converts curl commands into ready-to-use JavaScript.
Output: Fetch API · Axios · Supports: Methods, headers, body, auth
How to Use
- Paste your curl command
Include all flags and data. - Choose output
Fetch or Axios. - Copy the generated code
Paste it in your project.
Handles line continuations: Multi-line curl commands with backslashes work fine.
About This Tool
Parses curl syntax including -X, -H, -d, and generates equivalent JavaScript. Auto-detects method and formats JSON bodies.
Privacy
Your curl commands stay in your browser.