414 URI Too Long
The request URL is longer than the server will accept. Almost always caused by putting data in a query string that belongs in a request body.
At a glance
- Status code
- 414 URI Too Long
- Class
- 4xx, client error, the request itself is the problem
- Defined in
- RFC 9110
- Cacheable by default
- yes
- Response body
- Optional.
In detail
There is no limit in the HTTP specification itself, so the number is a server or proxy configuration value, commonly around 8KB for the whole request line plus headers.
Convert the endpoint to accept POST with a body when the parameters can grow, such as a filter that accepts a list of identifiers.
Look at the total request line, not just the path. A long redirect chain that keeps appending return-URL parameters is a frequent cause.
Examples
HTTP/1.1 414 URI Too Long
Content-Length: 0Things that catch people out
- Browsers have their own URL limits well below some server limits, so the failure mode differs by client.
- Nested URL encoding of a return URL doubles in length at each hop, which turns a working redirect into a 414 after a few bounces.
Try it: HTTP Request Builder
Build a request with any method, headers and body, send it, and read the status line the server returns.
HTTP Request Builder
LOCAL · Browser-OnlyBuild and test HTTP requests with custom headers and body
Authentication
Headers
Generate Code
curl -X GET 'https://api.example.com/endpoint' \
-H 'Content-Type: application/json'Showing a sample URL. Enter your endpoint above to update the snippet.
Related HTTP status codes
All http status codes →413 Content Too Large
The request body is larger than the server is willing to process. Formerly called Payload Too Large.
431 Request Header Fields Too Large
The request headers are collectively or individually too large. Oversized cookies are the usual cause.
400 Bad Request
The server refused the request because it was malformed. The client must change something before retrying, because repeating the same bytes will fail.
415 Unsupported Media Type
The server refuses the request because the body is in a format it cannot handle, as declared by Content-Type.
416 Range Not Satisfiable
The Range header asked for bytes that lie outside the resource, for example bytes 5000 to 6000 of a 2KB file.
417 Expectation Failed
The server cannot meet the requirement in the Expect header, which in practice always means Expect: 100-continue.
Tools for this
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL