MIME Types

application/x-www-form-urlencoded

The MIME type for URL-encoded form data submissions.

What Is This?

The application/x-www-form-urlencoded MIME type is the default encoding for HTML form submissions. It encodes form data as key-value pairs where keys and values are URL-encoded (spaces become +, special characters become %XX). This encoding is efficient for simple text data but inefficient for binary files.

Common Uses

1

Common Use

Standard HTML form submissions without file uploads

2

Common Use

OAuth 2.0 token endpoint requests

3

Common Use

Simple API POST requests with key-value data

4

Common Use

Legacy web application forms

Examples

Server Configuration

Serve files with the application/x-www-form-urlencoded MIME type:

# Nginx
location ~ \.$ {
  add_header Content-Type "application/x-www-form-urlencoded";
}

# Apache
AddType application/x-www-form-urlencoded 
HTML Usage

Use this MIME type in HTML or HTTP:

Content-Type: application/x-www-form-urlencoded

<!-- HTML reference -->
<link rel="preload" href="file" as="fetch" crossorigin>

Related Entries

More from this reference:

Frequently Asked Questions

Why is this encoding inefficient for binary data?

Binary data must be base64-encoded when sent as application/x-www-form-urlencoded, which increases the size by 33%. For file uploads, use multipart/form-data instead, which sends binary data more efficiently.

What is the size limit for URL-encoded data?

Most servers have a configurable limit (typically 1-8 MB) for URL-encoded request bodies. The URL length itself is limited to about 8 KB in most browsers and servers.