POST form fields
--data-urlencode is commonly used for application/x-www-form-urlencoded form fields where spaces and special characters must be encoded safely.
Convert cURL commands that use --data-urlencode for search parameters, form posts, and GET query strings.
Try URL Encoded Conversion--data-urlencode is commonly used for application/x-www-form-urlencoded form fields where spaces and special characters must be encoded safely.
When combined with -G, encoded data is moved to the URL query string and the generated request remains a GET request.
If an encoded value asks curl to read from a local file or stdin, the converter reports a warning because an online parser cannot read that input.
curl -G --data-urlencode 'q=hello world' --data-urlencode 'page=1' https://api.example.com/search
-d sends text as provided, while --data-urlencode encodes names or values before sending them.
Yes. Use -G with --data-urlencode to append encoded values to the URL query string.