How Long Can a URL Be? Practical Limits Explained
By Urlzee Team · Published · 6 min read
A URL has no official maximum length. The HTTP standard sets none, so the real limit is the lowest one imposed by the browsers, servers, proxies and apps a link passes through. Modern browsers accept very long addresses, many servers stop at about 8,000 characters by default, and staying under roughly 2,000 is the safe choice.
Does the HTTP standard set a maximum URL length?
No. The HTTP specification deliberately avoids a fixed number. RFC 9110 recommends that senders and recipients support URIs of at least 8,000 octets, and defines a status code, 414 URI Too Long, for a server to return when a request target is longer than it is willing to process.
So the standard gives a recommended minimum, not a maximum. Every piece of software is free to choose its own ceiling above that, and some older or stricter ones sit below it.
How long can a URL be in different browsers?
Current browsers handle URLs far longer than any person would type. The limits that are well documented:
| Browser | Known limit | Notes |
|---|---|---|
| Chrome (and Chromium-based browsers) | 2 MB, about 2 million characters | Stated in Chromium's own documentation |
| Internet Explorer | 2,083 characters | Historic; the origin of the "2,000" rule |
| Firefox | Very long; no single published figure | Handles URLs well beyond typical server limits |
| Safari | Very long; no single published figure | Handles URLs well beyond typical server limits |
Specific numbers for Firefox and Safari are quoted around the web, but they come from tests on particular versions and should be treated as approximate. The practical conclusion is the same for all current browsers: the browser is almost never the part that fails.
Note that a browser being able to load a long URL does not mean it will show all of it. Address bars truncate what they display.
How long can a URL be on a web server?
Servers are stricter than browsers, and their defaults are where most real failures occur. The limit usually applies to the request line or to the headers as a whole, so the usable URL length is slightly less than the figure.
| Server | Default limit | Setting that controls it |
|---|---|---|
| Apache HTTP Server | 8,190 bytes for the request line | LimitRequestLine |
| nginx | 8 KB buffer for the request line | large_client_header_buffers |
| Microsoft IIS | 4,096 characters for the URL, 2,048 for the query string | maxUrl and maxQueryString in request filtering |
These are defaults, and an administrator can change them. A typical request also passes through more than one server: content delivery networks, load balancers and firewalls each have their own limit, and the lowest one wins. If you are linking to someone else's site, assume ordinary defaults.
What happens when a URL is too long?
The request is rejected before the page logic ever runs. What the visitor sees depends on which component refused it:
- 414 URI Too Long is the correct response for an over-length request target.
- 400 Bad Request is what some servers and proxies send instead.
- 431 Request Header Fields Too Large can appear when the URL pushes the total header size over a limit.
- A truncated link is the silent failure. A messaging app or email client cuts the URL at some point, the visible link still looks plausible, and it leads to an error page or the wrong content.
You can test how a destination responds with the link checker, which reports the status code the server returns. HTTP status codes: a practical guide explains what each one means.
What is a safe URL length?
Keep URLs under about 2,000 characters if they need to work everywhere. That figure is a convention, but it rests on two concrete limits: Internet Explorer's 2,083-character cap, and the sitemap protocol's rule that a URL listed in an XML sitemap must be shorter than 2,048 characters.
For day-to-day use, far shorter is better:
- Under 2,000 characters: works across browsers, default server settings and sitemaps.
- Under a few hundred: copies and pastes reliably and survives most apps.
- Under about 100: readable, and comfortable in print.
If a page on your own site needs a URL approaching the upper end, the design is usually the problem. Large amounts of state belong in a POST request body or in server-side storage referenced by a short ID, not in the query string.
Where do length limits bite when sharing a link?
When you share a link, the limits that matter come from the place you are posting it, not from HTTP.
- SMS. A standard text message segment holds 160 characters in the basic GSM alphabet. A long URL can consume most of that, or push the message into multiple segments.
- Email. Plain-text emails can wrap long lines, which sometimes breaks a URL in two so only the first part is clickable.
- QR codes. A QR code can hold a lot of data in theory (the largest version stores up to 2,953 bytes at the lowest error correction level), but every extra character adds modules. A long URL makes a dense code that needs to be printed larger and is harder to scan.
- Print. Nobody retypes a 200-character address.
In all of these, a short link solves the problem. Shortening a 400-character tagged URL with the URL shortener gives you a link of around 20 characters, and the full address is restored by the redirect when someone clicks.
Why do URLs get so long in the first place?
Almost all the length comes from the query string. The scheme, host and path of a typical page add up to well under 100 characters. Then things get appended:
- Tracking parameters. Five UTM tags with descriptive values can add 150 characters. Advertising platforms append click identifiers on top.
- Filters and search state. A product listing with ten filters selected writes each one into the URL.
- Prefilled form data. Links that pre-populate a form carry every field value.
- Encoded characters. Each space becomes
%20, three characters for one. Non-Latin text grows more: a single character can become six or nine once percent-encoded. URL encoding explained shows why. - Nested URLs. A redirect or login link that carries another full URL as a parameter, which must itself be encoded.
Knowing which parts are which helps you trim safely. Anatomy of a URL breaks down what each part does and which are optional.
Does shortening a URL get around length limits?
It gets around limits at the sharing end, not at the destination. A short link replaces the long address everywhere a person or an app has to handle it: the message, the post, the printed page, the QR code.
When someone clicks, though, the shortener answers with a redirect containing the full original URL, and the visitor's browser requests that from the destination server. If that server rejects URLs over 8,000 characters, it will reject this one too. Shortening changes what you share, not what the destination has to accept.
Shorteners also have their own maximum for the URL they will store, which varies by service. Urlzee accepts destinations of up to 2,048 characters. If a destination is long enough to hit a limit like that, that is a strong sign the URL needs redesigning, not shortening.
How do you make a URL shorter without a shortener?
Remove what the destination does not need.
- Delete tracking parameters you are not using, such as leftover click IDs copied from an advert.
- Remove default values.
?page=1&sort=defaultusually loads the same content as no query at all. - Drop the fragment unless you want to land on a specific section.
- Check whether the site offers a shorter canonical form, such as a product URL without the descriptive title segment.
- Load the trimmed URL to confirm it shows the same page.
Then, if it is still unwieldy for where it is going, shorten what is left.
Frequently asked questions
- What is the maximum length of a URL?
- The standards set no maximum. In practice the limit is whatever the strictest browser, server or app in the chain accepts. Around 2,000 characters is the widely used safe ceiling.
- Why is 2,000 characters often quoted as the URL limit?
- Internet Explorer accepted at most 2,083 characters, and the sitemap protocol requires URLs under 2,048 characters. Staying below roughly 2,000 kept a URL working in both, and the habit stuck.
- What happens if a URL is too long?
- A server that refuses it returns HTTP 414 URI Too Long, or sometimes a generic 400 error. Apps may also cut the link off, so only part of it stays clickable.
- Does shortening a URL fix length problems?
- It fixes problems where the link is shared: character limits, wrapping and dense QR codes. It does not help if the destination server itself rejects the long URL, because the redirect still sends the full address.