CurlCraft Documentation
Supported Converters
CurlCraft doesn't just do a blind text swap. It understands the underlying request structure and provides optimized code for:
- Native Fetch: Modern, dependency-free browser code.
- Axios: Clean, promise-based requests with dedicated config objects.
- TypeScript: Strongly-typed request patterns with interface suggestions.
- Explain Mode: A plain-English breakdown of what the cURL command is actually doing.
Conversion Options
Tailor the generated output to your project's coding style:
- Runtime Toggle: Switch between Browser (standard APIs) and Node.js (using packages like
node-fetch). - Syntax Style: Choose between modern
async/awaitor legacy.then()promise chains. - Error Handling: Automatically wraps code in
try/catchblocks with status check logic. - Timeout Injection: Adds
AbortControllerlogic to native fetch to prevent hanging requests.
Security & Privacy
Network requests often contain sensitive data like Bearer tokens, API keys, and session cookies. CurlCraft protects this data in two ways:
- Local Execution: The regex parsing engine runs entirely in your browser's JavaScript VM. No data is sent to a backend API.
- Secret Masking: If enabled, CurlCraft automatically redacts known sensitive patterns (e.g.,
Authorization: Bearer ***) in the UI, allowing you to debug logic without exposing your live credentials.
Common Use Cases
CurlCraft is ideal for:
- Migrating legacy
curlshell scripts to a new Node.js microservice. - Testing API documentation examples directly in your frontend application.
- Quickly generating boilerplate for complex
multipart/form-datauploads.
Frequently Asked Questions
Does it support cookies (-b/--cookie)?
Yes. It parses cookie flags, though note that browser requests are subject to withCredentials and CORS policies which cURL ignores.
Can I use it for GraphQL?
Absolutely. If you paste a cURL command containing a JSON body with a query field, CurlCraft will correctly format the payload for your JS request.
Stop writing boilerplate
Use CurlCraft to turn CLI commands into production code in milliseconds.
Launch CurlCraft