cURL to Playwright API Request Converter
Convert browser DevTools cURL commands into idiomatic Playwright request.get() and request.post() TypeScript code.
How to Use cURL to Playwright API Request Converter
- 1
Paste cURL Command
Copy a network request as cURL (bash) from Chrome or Firefox DevTools and paste it into the input box.
- 2
Parse Headers, Auth & Payload
Click Run Tool to extract HTTP methods, bearer tokens, cookies, query params, and JSON or form bodies.
- 3
Copy Playwright Test Code
Copy the generated async Playwright APIRequestContext snippet straight into your test spec.
Frequently Asked Questions
How does Playwright handle JSON bodies compared to cURL?
Instead of passing raw strings with manual Content-Type headers, Playwright's request context accepts a clean data object and automatically serializes JSON payloads.
Are Authorization headers and cookies preserved?
Yes. All -H headers, Basic/Bearer auth flags (-u), and Cookie headers are mapped into Playwright's headers configuration object.
Is my authentication token safe when converting cURL commands?
Yes. The parser runs strictly inside your browser with zero server logging, protecting session cookies and bearer tokens.
Related Free Tools
OpenAPI to MCP Tool Schema Generator
Bridge existing REST APIs to AI agents by converting OpenAPI paths and request bodies into ready-to-use MCP tool schemas.
Cron Expression Generator for GitHub Actions
Generate accurate 5-field POSIX cron expressions with UTC run previews and ready-to-paste GitHub Actions YAML blocks.
Dockerfile to Docker Compose Converter
Generate clean, maintainable docker-compose.yml service definitions from Dockerfiles and docker run flags.