Skip to content
Private: files never leave your device

URL Length Limits by Browser and Server

There is no single maximum URL length. Each browser, web server, CDN and app sets its own, and the shortest one on the route from the visitor to your code is the one that counts. This page lists the published limits from the official documentation, what happens when a URL is too long, and a safe size to design for.

URL length limits: Chrome 2 MB, nginx 8 KB request line, Apache 8190 bytes and IIS 4096 by default

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

WhereLimitWhat it countsSetting
HTTP standard (RFC 9110)Support at least 8000 octets (recommended, not a cap)The whole URI in protocol elementsNone
Google Chrome and Chromium2 MBThe URLFixed
Data URLs in Chromium and Firefox512 MBThe whole data: URLFixed
Data URLs in Safari (WebKit)2048 MBThe whole data: URLFixed
Internet Explorer (legacy)2083 charactersINTERNET_MAX_URL_LENGTH in WinInetFixed
nginxOne large_client_header_buffers buffer, 8k by defaultThe full request linelarge_client_header_buffers 4 8k;
Apache httpd8190 bytes by defaultThe full request lineLimitRequestLine
IIS request filtering4096 by defaultThe URLmaxUrl
IIS request filtering2048 by defaultThe query stringmaxQueryString
Cloudflare proxy16 KBThe URLFixed
XML sitemapsLess than 2,048 charactersEach loc valueFixed by the protocol
SharePoint and OneDrive400 charactersThe decoded file path, including the file nameFixed

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 failsWhat the visitor or client sees
Any server following RFC 9110414 URI Too Long: the target URI is longer than the server is willing to interpret
nginx request line larger than one buffer414 (Request-URI Too Large)
nginx single header field larger than one buffer400 (Bad Request)
Apache over LimitRequestLineThe request line is refused; raise LimitRequestLine to accept longer lines
IIS over maxUrl or maxQueryStringRequest filtering rejects the request; raise maxUrl or maxQueryString to accept it
Raising a server limit On nginx, raise the second number, for example 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

PageCheckedUsed for
RFC 9110: HTTP Semantics23 November 20268000 octet recommendation and the 414 URI Too Long status
Chromium URL display guidelines23 November 2026Chrome 2 MB URL limit
MDN: data URLs23 November 2026Data URL limits in Chromium, Firefox and Safari
Microsoft Learn archive: IEInternals URL length limits23 November 2026Internet Explorer 2083 character limit
nginx core module docs23 November 2026large_client_header_buffers default, 414 and 400 behaviour
Apache httpd 2.4 core directives23 November 2026LimitRequestLine and LimitRequestFieldSize defaults
Microsoft Learn: IIS requestLimits23 November 2026maxUrl and maxQueryString defaults
Cloudflare connection limits23 November 202616 KB URL limit
Sitemaps.org protocol23 November 2026Sitemap loc length
Microsoft Learn: SharePoint limits23 November 2026400 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.