# cURL to Swift

Convert curl to Swift (URLSession). Client-side and secret-safe, with guides for HTTP methods, content types and auth schemes.

Paste a curl command and get idiomatic Swift. Parsing and code generation happen entirely in your browser.

## Guides

- [Convert a cURL GET request to Swift](https://toolpaper.manavdev.site/how-to/curl-get-in-swift.md): Convert a curl GET command to Swift (URLSession). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL POST request to Swift](https://toolpaper.manavdev.site/how-to/curl-post-in-swift.md): Convert a curl POST command to Swift (URLSession). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PUT request to Swift](https://toolpaper.manavdev.site/how-to/curl-put-in-swift.md): Convert a curl PUT command to Swift (URLSession). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PATCH request to Swift](https://toolpaper.manavdev.site/how-to/curl-patch-in-swift.md): Convert a curl PATCH command to Swift (URLSession). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL DELETE request to Swift](https://toolpaper.manavdev.site/how-to/curl-delete-in-swift.md): Convert a curl DELETE command to Swift (URLSession). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Send JSON with cURL in Swift](https://toolpaper.manavdev.site/how-to/send-json-with-curl-in-swift.md): Convert a curl command that sends JSON into Swift (URLSession). Body serialization, Content-Type, and encoding handled correctly.
- [Send form-urlencoded with cURL in Swift](https://toolpaper.manavdev.site/how-to/send-form-with-curl-in-swift.md): Convert a curl command that sends form-urlencoded into Swift (URLSession). Body serialization, Content-Type, and encoding handled correctly.
- [Send multipart form-data with cURL in Swift](https://toolpaper.manavdev.site/how-to/send-multipart-with-curl-in-swift.md): Convert a curl command that sends multipart form-data into Swift (URLSession). Body serialization, Content-Type, and encoding handled correctly.
- [Send XML with cURL in Swift](https://toolpaper.manavdev.site/how-to/send-xml-with-curl-in-swift.md): Convert a curl command that sends XML into Swift (URLSession). Body serialization, Content-Type, and encoding handled correctly.
- [Send GraphQL with cURL in Swift](https://toolpaper.manavdev.site/how-to/send-graphql-with-curl-in-swift.md): Convert a curl command that sends GraphQL into Swift (URLSession). Body serialization, Content-Type, and encoding handled correctly.
- [cURL with Bearer token in Swift](https://toolpaper.manavdev.site/how-to/curl-bearer-auth-in-swift.md): Convert a curl command using Bearer token to Swift (URLSession). Credentials pass through cleanly and can be redacted before you share.
- [cURL with Basic auth in Swift](https://toolpaper.manavdev.site/how-to/curl-basic-auth-in-swift.md): Convert a curl command using Basic auth to Swift (URLSession). Credentials pass through cleanly and can be redacted before you share.
- [cURL with API key in Swift](https://toolpaper.manavdev.site/how-to/curl-api-key-auth-in-swift.md): Convert a curl command using API key to Swift (URLSession). Credentials pass through cleanly and can be redacted before you share.

---

Source: https://toolpaper.manavdev.site/curl-to-swift · Converter: https://toolpaper.manavdev.site/curl-converter