Values
Which enctype values are there?
There are three: application/x-www-form-urlencoded (the default), multipart/form-data for forms with files, and text/plain. They only apply when the form uses method="post".
| Value | What is sent | Use it for |
|---|---|---|
application/x-www-form-urlencoded | The default. name=value pairs joined with &; spaces and special characters are percent-encoded. | Text-only forms. |
multipart/form-data | Each field is a separate part, split by a boundary, with file contents included. | Any form with a file input. |
text/plain | name=value lines with no escaping, so the data can't be decoded reliably. | Debugging only, never in production. |
| Invalid or missing value | The browser falls back to the default, application/x-www-form-urlencoded. | Nothing: set a real value or leave it out. |
Sources: WHATWG HTML Standard: enctype · MDN: HTMLFormElement.enctype




