cURL
curl a.com -H "A: 1"
Fetch
fetch("a.com", { headers: { "A": "1" } })Developer Tools
Convert cURL commands into JavaScript fetch code. Parses -X, -H, and --data-raw into method, headers, and body, with optional async/await wrapping.
Favorite this tool
No favorite storage mode has been selected.
Quick actions
Copy this tool URL or open the system share sheet on a supported device.
开发工具
Convert cURL commands into JavaScript fetch code. Parses -X, -H, and --data-raw into method, headers, and body, with optional async/await wrapping.
粘贴 cURL 后会自动生成 Fetch 代码。
cURL
curl a.com -H "A: 1"
Fetch
fetch("a.com", { headers: { "A": "1" } })Yes. --data and --data-raw become the request body and may set POST automatically.
Headers from -H are preserved; scrub secrets before sharing generated code.
Tools
Continue with another translated tool for a nearby task.
URL Builder
Build URLs from protocol, host, port, path, hash, and query parameters with automatic value escaping, or parse a full URL back into fields. Handy for API debugging and campaign link setup. Processing stays in the browser.
JSON to TypeScript Interface
Infer TypeScript interface definitions from JSON in your browser. Nested objects become separate interfaces, with options for the root name, optional fields, readonly, export, and type aliases.