HTTP-statuskoder
NyttSøkbar referanse for HTTP-statuskoder med lettfattelige forklaringer.
No status codes match your search.
Runs entirely in your browser. Nothing is uploaded.
A complete, searchable HTTP status codes reference
This HTTP status codes reference puts every standard code in one searchable place. Type a number like 404, a name like unauthorized, or a keyword like redirect, and the matching codes appear instantly with a plain-English meaning. Each entry shows its class colour, the official RFC reference, and — for errors — the common causes and how to fix them.
Unlike static list of HTTP status codes pages, this is interactive: filter by class, flip to a compact cheat sheet, or jump straight to a single code. Because the whole dataset ships with the page, lookups are instant and work offline. No sign-up, no rate limits, no ads loading before you can see the answer.
The five classes of HTTP status codes
Every code falls into one of five classes set by its first digit. 1xx Informational means the request was received and is continuing (100 Continue, 101 Switching Protocols). 2xx Success means it worked (200 OK, 201 Created, 204 No Content). 3xx Redirection sends you elsewhere (301, 302, 304, 307, 308).
4xx Client error means your request is wrong (400, 401, 403, 404, 429), and 5xx Server error means the server failed (500, 502, 503, 504). Knowing the class tells you who's at fault before you even read the code: a 4xx is yours to fix, a 5xx is the server's. That single distinction is the most useful thing to know about HTTP error handling — it tells you where to look before you dig into logs.
The most common HTTP status codes and what they mean
A handful of codes cover almost everything you'll see while building or debugging the web. On the success side, 200 OK and 201 Created confirm requests worked. Among redirects, 301 (permanent) and 302 (temporary) are the main pair, with 304 Not Modified powering browser caching.
Among client errors, 400, 401, 403, 404 and 429 dominate; among server errors, 500, 502, 503 and 504. Toggle 'Common only' above to filter the full registry down to this important shortlist, with causes and fixes for each one.
4xx vs 5xx: client errors versus server errors
The difference between 4xx and 5xx errors tells you where to look. A 4xx is a client error — the request is malformed, unauthenticated, forbidden, or pointed at a missing resource — so resending it unchanged won't help. Read the response body and headers, fix the request, then retry.
A 5xx is a server error — your request may be valid but the server couldn't fulfil it. A 500 usually means an unhandled exception, a 502 means a dead upstream behind a proxy, and a 503 means temporary overload or maintenance. For 5xx, the fix lives in server logs, not your request. This also means retry logic should only apply to 5xx responses, with exponential backoff — retrying a 4xx just burns request quota for no benefit.
Cloudflare 5xx codes (520–530) you won't find in the spec
If your site sits behind Cloudflare, you'll meet a family of non-standard 5xx codes the official HTTP spec never defines. 520 means the origin returned an empty or unexpected response, 521 means the origin refused the connection (it's offline or firewalling Cloudflare's IPs), 522 is a TCP connection timeout, 523 means the origin is unreachable (often bad DNS), and 524 means the origin connected but didn't reply within Cloudflare's 100-second window.
The SSL group — 525 SSL Handshake Failed and 526 Invalid SSL Certificate — shows up when the certificate on your origin is missing, expired, or doesn't match Cloudflare's Full (Strict) mode. 530 almost always travels with a 1xxx error in the body, usually an origin DNS failure (Error 1016). Most reference sites omit these codes entirely, which is exactly why developers end up searching for them mid-incident — they're searchable here with the same causes-and-fixes treatment as the standard codes.
How this compares to MDN, httpstatuses.com, and other references
The most-used alternative for HTTP status code lookups is MDN Web Docs. MDN's coverage is thorough and authoritative, but you navigate one page per code — there's no search bar that filters across all codes at once, no class filter, and no compact cheat-sheet mode. If you already know you're looking at a 429 and want its spec definition, MDN is excellent. If you're debugging a number you've never seen, a searchable reference is faster.
httpstatuses.com shows codes in a colour-coded grid with short descriptions but doesn't explain common causes or how to fix errors. restapitutorial.com and w3schools both cover HTTP codes in static tables without filtering. HTTP.cat is a fun meme site (each code maps to a cat photo) but impractical for real debugging. This tool combines live search, filter by class, cheat-sheet mode, causes, fixes, Cloudflare 5xx codes, and RFC links — all in one page that runs offline with no ads.
HTTP status codes and SEO
Status codes quietly shape how search engines crawl and rank a site. Every page you want indexed should return 200 OK. When you change a URL permanently, use a 301 Moved Permanently so ranking signals follow it; use 302 only for temporary moves so the original URL keeps its authority.
For removed content, 404 Not Found and 410 Gone both drop a page from the index — 410 faster, because it promises the resource is permanently gone. During planned downtime, return 503 Service Unavailable with a Retry-After header so crawlers come back later instead of de-indexing your pages. Getting these codes right is one of the cheapest wins available during site migrations — it takes minutes to configure, and the SEO impact is immediate.
1xx, 2xx, and 3xx codes in depth: the complete success and redirect picture
The 1xx Informational class is the HTTP protocol talking to itself. 100 Continue exists to avoid wasted bandwidth: when a client wants to send a large request body, it first sends the headers alone with an Expect: 100-continue header; the server replies 100 if it's willing to accept the payload, or a 4xx error to reject it before the body arrives. 101 Switching Protocols is the handshake that powers WebSocket connections — the browser sends an Upgrade: websocket header, and 101 confirms the server is switching from HTTP to the WebSocket protocol on that same TCP connection. You will rarely write code that generates 1xx codes, but understanding them explains why your WebSocket library works the way it does.
Within the 2xx Success class, the codes communicate different shapes of success. 200 OK is the broadest success — for a GET it returns the resource, for a POST it returns whatever the action produced. 201 Created is narrower: it signals that a POST or PUT specifically created a new resource, and the server should include a Location header pointing to it (e.g., Location: /users/42). 204 No Content means success but there is intentionally no response body — the right choice for a DELETE endpoint or a PUT update where the client has no need to see the result. 206 Partial Content is the backbone of media streaming and resumable downloads: when a client sends a Range: bytes=0-1048575 header, the server replies 206 with just that chunk of the file, enabling video players to seek without downloading from the beginning.
The 3xx Redirection codes form a precise vocabulary for telling clients where to go. 301 Moved Permanently and 308 Permanent Redirect both signal a forever move; the difference is that 301 historically allowed browsers to downgrade a POST to a GET on the new URL, while 308 guarantees the original method is preserved. Similarly, 302 Found and 307 Temporary Redirect both signal a temporary move, but 307 locks in the method. In practice: use 301 for page URL changes, use 308 when redirecting a form's POST target permanently. 304 Not Modified is not really a redirect — it's the server telling the browser during a cache validation request that its cached copy is still current, so no body is sent, saving bandwidth. A browser sends an If-None-Match or If-Modified-Since header; if the resource is unchanged, the server replies 304 and the browser serves from its local cache.
The critical 4xx and 5xx codes every developer must know
Within the 4xx client error class, several codes are consistently misused or misunderstood. 400 Bad Request is the correct response when the request is syntactically malformed — invalid JSON, a missing required query parameter, or a field with the wrong data type. 401 Unauthorized is poorly named: it actually means unauthenticated. The request lacks valid credentials, and the server should reply with a WWW-Authenticate header describing how to authenticate; if you provide a valid token, the same request can succeed. 403 Forbidden means you are authenticated but not authorized — you've proved who you are and the server knows it, but your account doesn't have permission. Providing different credentials won't help; you need different permissions. 405 Method Not Allowed is specific: the endpoint exists but doesn't support the HTTP method you used. A GET /users endpoint that only accepts POST will return 405 and must include an Allow header listing the accepted methods.
408 Request Timeout means the server closed the connection because the client took too long to send the complete request — common on slow mobile connections or large file uploads. 409 Conflict signals a state conflict: the request is valid but can't be completed given the current state of the resource — the canonical example is creating a resource that already exists (duplicate username, conflicting calendar booking). 410 Gone is the explicit alternative to 404: it tells crawlers and clients that the resource existed, was deliberately removed, and will never come back. Search engines remove a 410 page from their index faster than a 404 because 404 could be a temporary glitch. 422 Unprocessable Entity covers semantically valid requests that fail business logic validation — the JSON is well-formed and the request is authenticated, but the values themselves are invalid. 429 Too Many Requests is the rate-limiting code; it should always include a Retry-After header giving the number of seconds or an HTTP-date after which the client may retry.
In the 5xx server error class, the nuances matter for debugging. 500 Internal Server Error is the catch-all for unhandled exceptions — check your server logs for a stack trace. 502 Bad Gateway means a reverse proxy (Nginx, a load balancer, a CDN edge node) received an invalid response from your upstream application server — the app process likely crashed or returned garbage. 503 Service Unavailable signals the server is temporarily unable to handle requests due to overload or planned maintenance; include a Retry-After header so clients and crawlers back off gracefully rather than hammering the server. 504 Gateway Timeout differs from 502 in that the upstream server was reachable but simply didn't respond within the proxy's timeout window — a slow database query or an unresponsive microservice is often the cause. When on-call, the sequence to check is: 500 → app logs, 502 → is the app process alive, 503 → is the server under load or in maintenance mode, 504 → what upstream call is hanging.
HTTP status codes in REST API design: conventions that matter
REST API design hinges on using status codes to carry meaning that would otherwise bloat the response body. The 200 vs 201 distinction is the most commonly skipped convention: a POST /users endpoint that creates a user should return 201 Created with a Location: /users/42 header, not 200. Returning 200 for every successful response forces API consumers to inspect the body to understand what happened, which makes programmatic error handling harder and breaks tools that rely on HTTP semantics — monitoring dashboards, API gateways, and integration tests all work better when status codes carry the right meaning. Stripe, GitHub, and Twilio all follow this convention precisely, and their SDKs benefit from it.
The 204 vs 200 for DELETE question is a real design decision. 204 No Content signals clean deletion with no body — the absence of a body is itself the confirmation, and HTTP clients handle it efficiently. Some teams prefer returning 200 with a JSON body like {"deleted": true, "id": 42} to give frontend clients explicit confirmation without requiring them to trust a missing body. Neither approach violates the spec, but 204 is the more idiomatic REST choice, and mixing the two across endpoints in the same API creates confusion. Pick one and document it. A subtlety: if you return 204 for a resource that was already gone, that's correct — idempotent DELETE means calling it twice should not return 404 on the second call.
The 422 vs 400 boundary for validation errors has effectively been settled by major API providers. 400 Bad Request should mean the request was syntactically malformed — unparseable JSON, wrong Content-Type, missing required HTTP headers. 422 Unprocessable Entity should mean the request was well-formed but semantically invalid — an email field that isn't a valid email, a date range where end is before start, a reference to a foreign key that doesn't exist. Stripe, GitHub, and most modern REST APIs return 422 for validation errors, pairing it with a structured error body listing the offending fields. The alternative — returning 200 with an error in the body — is the worst pattern in API design: it breaks HTTP-level monitoring (a 200 won't trigger an alerting rule), makes it impossible to detect errors without parsing every response body, and is the reason GraphQL's blanket use of HTTP 200 for all responses (including errors that carry a top-level errors array) is controversial — debugging a GraphQL API through a standard HTTP monitoring tool is blind to application-level failures.
Frequently asked questions
What are HTTP status codes?
HTTP status codes are three-digit numbers a server sends back in the response to describe the result of your request. 200 means the request succeeded, 404 means the page wasn't found, and 500 means the server hit an error. The first digit groups the code into one of five classes — 2xx is always success, 5xx is always a server fault — so knowing the class tells you immediately where to start debugging: client side or server side.
What are the 5 classes of HTTP status codes (1xx, 2xx, 3xx, 4xx, 5xx)?
The first digit defines the class: 1xx Informational (the request was received and is continuing, e.g. 100 Continue), 2xx Success (it worked, e.g. 200 OK), 3xx Redirection (you need to go elsewhere, e.g. 301 Moved Permanently), 4xx Client error (your request is wrong, e.g. 404 Not Found), and 5xx Server error (the server failed, e.g. 500 Internal Server Error). Filter by any class in the tool above to see just that group with explanations of each code.
What are the most common HTTP status codes?
The ones you'll encounter daily are 200 OK, 201 Created, 204 No Content, 301 and 302 redirects, 304 Not Modified, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests, 500 Internal Server Error, 502 Bad Gateway, and 503 Service Unavailable. Toggle 'Common only' in the tool above to filter the full list down to just this short set, with causes and fixes for each one.
What does HTTP 200 OK and 201 Created mean?
200 OK is the standard success response — for a GET it returns the resource in the body, for a POST it returns the result of the action. 201 Created means a POST or PUT succeeded and created a new resource; the server normally puts that new resource's address in a Location header, e.g. Location: /users/42. If you're building an API and creating a resource, return 201 with a Location header — not 200 — so clients know where to find the new object.
What does a 404 Not Found error mean and how do I fix it?
404 means the server couldn't find anything at that URL — it doesn't exist, was moved, or the link is broken. Fix it by checking the URL for typos and wrong letter-casing, adding a 301 redirect from the old address to the new one, verifying your server's routing or rewrite rules, and serving a helpful custom 404 page. Unlike 410 Gone, a 404 doesn't promise the resource is gone for good, so search engines keep crawling it. MDN Web Docs covers the spec well, but this tool shows common causes and fixes right alongside each code.
What is the difference between a 301 and 302 redirect?
301 Moved Permanently says the resource has a new home for good, so search engines transfer ranking signals to the new URL and update their index — use it when you change a URL permanently. 302 Found is temporary: the original URL stays canonical and keeps its ranking, so use it for short-lived moves like A/B tests or a maintenance page. For non-GET requests use 308 (permanent) or 307 (temporary) instead, because they preserve the HTTP method rather than allowing browsers to downgrade a POST to a GET.
What does a 403 Forbidden error mean?
403 Forbidden means the server understood your request but refuses to authorize it — and unlike 401, sending credentials won't help. Typical causes are missing permissions or scopes on the account, wrong file permissions on the server (e.g. a file set to 600 instead of 644), an IP block or WAF rule, or a directory listing disabled with no index file present. Check the account's roles, the file permissions, and any allow-lists. Some servers deliberately return 403 instead of 404 to avoid revealing that a resource exists.
What is the difference between 500, 502, 503 and 504 server errors?
All are 5xx server faults but mean different things. 500 Internal Server Error is a generic 'something broke' — usually an unhandled exception or bug in the app. 502 Bad Gateway means a proxy got an invalid response from the upstream app server (often it crashed). 503 Service Unavailable means the server is temporarily down or overloaded — it should include a Retry-After header. 504 Gateway Timeout means the upstream was reachable but too slow to respond in time. Start with server logs to distinguish these in practice.
What does HTTP 429 Too Many Requests mean?
429 means you've hit a rate limit — too many requests in a given time window. The server should include a Retry-After header telling you how long to wait. Fix it by honouring that header, adding exponential backoff between retries, caching responses to reduce request volume, or asking for a higher quota. It's common on public APIs and login endpoints guarding against abuse. GitHub, Stripe, and Twitter/X all use 429 for API rate limiting.
What is the difference between 4xx and 5xx errors?
4xx errors are the client's fault — the request itself is wrong, so retrying it unchanged won't help (400 Bad Request, 401 Unauthorized, 404 Not Found). 5xx errors are the server's fault — your request may be perfectly valid but the server failed to fulfil it (500, 502, 503), so the same request can succeed once the server recovers. Fix your request for 4xx, fix the server for 5xx. This distinction matters for retry logic: only retry on 5xx with exponential backoff, not on 4xx.
Which HTTP status codes matter most for SEO?
The key ones are 200 OK (every indexable page should return this), 301 Moved Permanently (passes ranking to a new URL during migrations), 302 Found (temporary — keeps ranking on the original URL), 404 Not Found and 410 Gone (tell crawlers a page is missing; 410 is removed from the index faster because it's permanent), and 503 Service Unavailable (the SEO-safe code for planned maintenance — tells Google to come back later instead of de-indexing the page).
What is the difference between 401 and 403?
401 Unauthorized actually means 'unauthenticated' — you haven't proved who you are, so sending valid credentials (a token, API key, or login session) can fix it; the server should reply with a WWW-Authenticate header. 403 Forbidden means you are authenticated but simply aren't allowed to access this resource — better credentials won't help, you need different permissions. Rule of thumb: 401 = who are you, 403 = you can't do that.
What is the difference between 307/308 and 301/302 redirects?
All four are redirects, but 307 and 308 guarantee the original HTTP method and body are preserved, while 301 and 302 historically allow clients to switch a POST to a GET on the redirected request. So 301 (permanent) and 302 (temporary) are fine for plain page redirects, but for an endpoint that receives POST or PUT data, use 308 for permanent moves and 307 for temporary ones to keep the method intact and avoid data loss.
What are Cloudflare 5xx codes like 520, 521, 522 and 525?
Codes in the 520–530 range are non-standard codes that Cloudflare returns when something fails between Cloudflare and your origin server — they're not part of the official HTTP spec but you'll see them constantly behind Cloudflare. 520 means the origin sent an empty or unexpected reply, 521 means the origin refused the connection (it's down or firewalling Cloudflare), 522 means the TCP connection timed out, 523 means the origin is unreachable, 524 means the origin connected but didn't respond within 100 seconds, 525 and 526 are SSL handshake and certificate failures, and 530 is usually an origin DNS error paired with a 1xxx code. Search any of these numbers above for causes and fixes.
How does this compare to MDN Web Docs or httpstatuses.com?
MDN Web Docs is the authoritative spec reference but has no live search bar, no filter-by-class, and no compact cheat-sheet view — you navigate one page per code. httpstatuses.com shows codes in a grid but omits causes and practical fixes. restapitutorial.com covers REST conventions without an interactive lookup. HTTP.cat is a fun meme site (each code maps to a cat photo) but impractical for real debugging. This tool combines a searchable reference, class filter, cheat-sheet mode, plain-English causes and fixes, and the Cloudflare 5xx codes most references skip — all in one page that runs offline with no ads or sign-up.
Is this HTTP status code reference free and private?
Completely. The entire list ships as static data inside the page, so every search, filter, and lookup runs locally in your browser — nothing is uploaded, logged, or sent to a server. That also means it loads instantly and keeps working offline once the page is open. No sign-up, no account, no rate limit, and no paywall. Just a fast, private reference that works as well on your phone as it does on a desktop.
Related tools
Se alle verktøyJSON Schema Validator
Validate JSON against a JSON Schema (draft-07 / draft-2020-12) with clear error messages.
YAML Formatter
Validate, beautify, and convert YAML online. Real-time syntax highlighting, error detection with line numbers, and one-click JSON export.
JSON-formaterer
Forskjønn, minifiser og valider JSON med umiddelbare feiltips.
Base64 koding / dekoding
Konverter tekst og filer til og fra Base64 med ett klikk.
Diff-sjekker
Sammenlign to tekster og fremhev alle forskjeller, side om side eller innebygd.
URL-koder / dekoder
Prosentkod eller dekod tekst og analyser spørringsstrenger, alt i nettleseren din.