Example

cURL Form Data and File Upload Examples

Learn how multipart cURL requests with -F fields and file uploads are parsed and converted into code.

Try Multipart Conversion

Text fields

Use -F 'name=value' for multipart text fields. The parser stores these as form_data text entries and generated code writes them as multipart form fields.

File fields

Use -F 'file=@/path/to/file.png' for uploads. Generated browser and example snippets use placeholders because online tools cannot read your local files.

Content type metadata

If a field includes ;type=image/png or ;filename=name.png, the parser preserves the metadata where possible for code generation.

Multipart upload cURL

curl -X POST https://api.example.com/upload -F 'avatar=@/tmp/avatar.png;type=image/png' -F 'description=Profile picture'

FAQ

Will the tool upload my local file?

No. It only parses the path and generates code. It cannot read or upload local files.

When should I use -F instead of -d?

Use -F for multipart forms, especially file uploads. Use -d for JSON or URL encoded request bodies.