The HTTP standard sets no hard maximum URL length, but RFC 9110 recommends that every sender and recipient support URIs of at least 8000 octets, and in practice the limit is whatever the strictest server or browser on the route allows. Chrome accepts URLs up to 2 MB, while common server defaults sit far lower: 4096 for the IIS URL and 2048 for its query string, 8190 bytes for the Apache request line and one 8 KB buffer for the nginx request line. Every figure below was checked on 23 November 2026 against the vendor documentation linked in the sources table.
Published URL length limits
| Where | Limit | What it counts | Setting |
|---|---|---|---|
| HTTP standard (RFC 9110) | Support at least 8000 octets (recommended, not a cap) | The whole URI in protocol elements | None |
| Google Chrome and Chromium | 2 MB | The URL | Fixed |
| Data URLs in Chromium and Firefox | 512 MB | The whole data: URL | Fixed |
| Data URLs in Safari (WebKit) | 2048 MB | The whole data: URL | Fixed |
| Internet Explorer (legacy) | 2083 characters | INTERNET_MAX_URL_LENGTH in WinInet | Fixed |
| nginx | One large_client_header_buffers buffer, 8k by default | The full request line | large_client_header_buffers 4 8k; |
| Apache httpd | 8190 bytes by default | The full request line | LimitRequestLine |
| IIS request filtering | 4096 by default | The URL | maxUrl |
| IIS request filtering | 2048 by default | The query string | maxQueryString |
| Cloudflare proxy | 16 KB | The URL | Fixed |
| XML sitemaps | Less than 2,048 characters | Each loc value | Fixed by the protocol |
| SharePoint and OneDrive | 400 characters | The decoded file path, including the file name | Fixed |
The browser figures are the most generous. For ordinary links, the server and CDN rows are what usually go wrong first. Firefox, Safari and Edge do not publish a general URL length limit in the documentation checked here, so no figure is given for them.
Request line versus URL
nginx and Apache do not measure the URL alone. They measure the request line, which is the method, the path with its query string, and the protocol version, for example GET /search?q=pdf HTTP/1.1. A request to Apache with the default LimitRequestLine of 8190 therefore has a little less than 8190 bytes left for the path and query. IIS checks the URL and the query string separately, so a short path with a 3000 character query string passes maxUrl but fails maxQueryString.
Limits are also counted after encoding. A space sent as %20 takes three bytes, and each non-ASCII letter takes two to four bytes in UTF-8 before percent-encoding turns every byte into three characters. A query that looks like 1000 characters on screen can be well over 2000 on the wire. Paste it into the URL Encoder and Decoder to see the real encoded length.
What a too-long URL returns
| Where it fails | What the visitor or client sees |
|---|---|
| Any server following RFC 9110 | 414 URI Too Long: the target URI is longer than the server is willing to interpret |
| nginx request line larger than one buffer | 414 (Request-URI Too Large) |
| nginx single header field larger than one buffer | 400 (Bad Request) |
| Apache over LimitRequestLine | The request line is refused; raise LimitRequestLine to accept longer lines |
| IIS over maxUrl or maxQueryString | Request filtering rejects the request; raise maxUrl or maxQueryString to accept it |
large_client_header_buffers 4 16k;, in the http or server block. On Apache, set LimitRequestLine 16380 in the server config or virtual host. On IIS, change maxUrl and maxQueryString in the requestLimits element of web.config. A CDN or proxy in front of the server keeps its own limit, so raising the origin alone may not be enough.Worked example: a search filter URL
A shop builds filter links such as /products?colour=red&colour=blue&size=10&.... With 120 selected filters of about 20 characters each, the query string reaches roughly 2400 characters. That is under the Chrome and Cloudflare limits and under the Apache and nginx request line defaults, but over the IIS maxQueryString default of 2048, so an IIS origin refuses it. The same URL would also be rejected from an XML sitemap, which caps each loc at under 2,048 characters.
A safe size to design for
- Links people share and sitemap entries: keep them under 2,048 characters, which fits the sitemap rule and the IIS query string default.
- API GET requests: stay under about 4000 characters, the IIS maxUrl default and half the 8000 octets RFC 9110 recommends, unless you control every server and proxy on the route.
- Large data: send it in a POST body instead of the query string. Bodies have their own limits, but they are measured in megabytes rather than kilobytes.
- Files in SharePoint or OneDrive: keep the full decoded path, folders and file name together, at 400 characters or fewer.
For readable page addresses, see what a URL slug is. To shrink data before putting it in a URL, the Base64 Encode and Decode tool shows how much longer Base64 makes it.
Sources and dates
| Page | Checked | Used for |
|---|---|---|
| RFC 9110: HTTP Semantics | 23 November 2026 | 8000 octet recommendation and the 414 URI Too Long status |
| Chromium URL display guidelines | 23 November 2026 | Chrome 2 MB URL limit |
| MDN: data URLs | 23 November 2026 | Data URL limits in Chromium, Firefox and Safari |
| Microsoft Learn archive: IEInternals URL length limits | 23 November 2026 | Internet Explorer 2083 character limit |
| nginx core module docs | 23 November 2026 | large_client_header_buffers default, 414 and 400 behaviour |
| Apache httpd 2.4 core directives | 23 November 2026 | LimitRequestLine and LimitRequestFieldSize defaults |
| Microsoft Learn: IIS requestLimits | 23 November 2026 | maxUrl and maxQueryString defaults |
| Cloudflare connection limits | 23 November 2026 | 16 KB URL limit |
| Sitemaps.org protocol | 23 November 2026 | Sitemap loc length |
| Microsoft Learn: SharePoint limits | 23 November 2026 | 400 character decoded path limit |
Frequently asked questions
What is the maximum length of a URL?
There is no single maximum. RFC 9110 recommends supporting at least 8000 octets, Chrome accepts up to 2 MB, and server defaults are lower, such as 4096 for an IIS URL and 8190 bytes for an Apache request line.
What is the URL length limit in Chrome?
The Chromium URL display guidelines say Chrome limits URLs to a maximum of 2 MB.
What error does a too-long URL return?
Usually 414 URI Too Long, the status RFC 9110 defines for a target URI longer than the server is willing to interpret. nginx returns 414 when the request line is larger than one header buffer.
What is the default nginx URL length limit?
The request line must fit in one buffer of large_client_header_buffers, whose default is 4 8k, so about 8 KB including the method and protocol.
What is the IIS query string length limit?
2048 by default, set by maxQueryString in the requestLimits element. The whole URL defaults to 4096 through maxUrl.
How long can a URL in a sitemap be?
The sitemaps.org protocol says each loc value must be less than 2,048 characters.