Media type · application/x-www-form-urlencoded
application/x-www-form-urlencoded
application/x-www-form-urlencoded is the default encoding for HTML form submissions.
Key facts
| Type | application/x-www-form-urlencoded |
|---|---|
| Extensions | None |
| Standard | WHATWG URL; HTML |
| Text or binary | Text |
| Browser behavior | Default for method=post forms |
What it is
Fields are serialized as name=value pairs joined by &. Characters outside the safe set are percent-encoded, and spaces become +. A form submitted without an enctype uses this type, which is why a plain login form works without JavaScript.
Limits and mistakes
It cannot carry binary files without corrupting them — use multipart/form-data for uploads. Repeated field names produce repeated keys, and the server must decide whether to keep the first, the last or a list. Sending a JSON string as a single field is valid but forces the server to parse twice; if the payload is JSON, send it as application/json.
Frequently asked questions
Why does a space become a plus sign?
The form encoding maps spaces to + and reserves %20 for literal percent-encoding. Servers decode + back to a space.
Can I upload a file with this type?
No. Use multipart/form-data; URL encoding would corrupt binary bytes.