개발자

HTTP 상태코드 사전

200·404·500 등 HTTP 상태코드의 의미를 조회

검색·필터는 브라우저에서만 처리되며 서버로 전송되지 않습니다.Search and filtering run entirely in your browser — nothing is sent to a server.

HTTP 상태코드 사전이란?

HTTP 상태코드 사전은 서버 응답에 담긴 세 자리 상태코드의 의미·발생 상황·대처법을 즉시 찾아볼 수 있는 도구입니다. 코드 숫자나 이름 일부를 입력하거나 분류 칩을 눌러 원하는 코드를 빠르게 찾을 수 있습니다.

분류 설명
  • 1xx 정보: 요청을 받았고 처리가 계속 진행 중임을 알립니다.
  • 2xx 성공: 요청이 정상적으로 처리되었습니다.
  • 3xx 리다이렉션: 요청을 완료하려면 추가 동작(다른 주소로 이동 등)이 필요합니다.
  • 4xx 클라이언트 오류: 요청 자체에 문제가 있어 서버가 처리할 수 없습니다.
  • 5xx 서버 오류: 요청은 유효하지만 서버 쪽 문제로 처리에 실패했습니다.
개인정보·처리 방식

모든 검색·필터링은 사용자의 브라우저 안에서만 이루어집니다. 입력한 검색어는 서버로 전송되거나 저장되지 않습니다.

5개 클래스 의미 체계 정리표

HTTP 상태코드는 첫 자리 숫자로 5개 클래스(범주)를 구분합니다. 각 클래스와 대표 코드를 정리하면 아래와 같습니다.

클래스의미대표 코드
1xx정보 — 요청 접수, 처리 계속 진행 중100, 101, 103
2xx성공 — 요청이 정상 처리됨200, 201, 204
3xx리다이렉션 — 완료하려면 추가 동작 필요301, 302, 304
4xx클라이언트 오류 — 요청 자체에 문제400, 401, 404
5xx서버 오류 — 요청은 유효하나 서버가 실패500, 502, 503

클라이언트(브라우저·API 라이브러리)는 첫 자리만 보고도 재시도·리다이렉트 추적·오류 처리 여부를 즉시 결정할 수 있어, 세부 코드를 모르더라도 클래스 구분만으로 기본적인 대응이 가능합니다.

실무 오용 사례 — 200에 에러 바디, 301 vs 302 캐시 함정

상태코드를 의미와 다르게 쓰는 실무 안티패턴 두 가지를 소개합니다.

① 200에 에러 바디 담기 — 일부 API는 실제로는 처리에 실패했는데도 응답 상태코드를 200 OK로 두고 본문(JSON)에만 {"error": "..."}를 담아 알립니다. 이렇게 하면 캐시·모니터링·API 클라이언트의 자동 재시도·로깅 로직이 모두 "성공"으로 오인해, 실패를 감지하려면 매번 응답 본문까지 파싱해야 하는 부담이 생깁니다. 실패는 4xx·5xx로, 성공은 2xx로 상태코드 자체를 정확히 쓰는 것이 원칙입니다.

② 301 vs 302 캐시 함정 — 301 Moved Permanently는 브라우저가 영구적으로 캐시해 이후 같은 주소로 재요청하지 않고 캐시된 리다이렉트 대상으로 바로 이동합니다. 리다이렉트 대상을 잘못 설정한 뒤 301로 내보내면 사용자 브라우저에 캐시가 남아 설정을 되돌려도 오래 문제가 지속될 수 있습니다(사용자가 캐시를 지워야 해결). 반대로 임시 조치인데 302 대신 301을 쓰면 검색엔진이 옛 URL의 SEO 가치를 새 URL로 영구 이전해버려 되돌리기 어렵습니다. 정말 영구적인 이동에만 301을, 임시 조치·A/B 테스트·점검 중 리다이렉트에는 302나 307을 쓰는 것이 안전합니다.

What is this tool?

The HTTP status code dictionary lets you instantly look up the meaning, typical cause, and recommended response for any three-digit status code returned by a server. Type a code number or part of its name, or use the category chips to filter.

Category guide
  • 1xx Informational: the request was received and processing continues.
  • 2xx Success: the request was completed successfully.
  • 3xx Redirection: further action (e.g. following another URL) is needed to complete the request.
  • 4xx Client Error: the request itself has a problem the server cannot process.
  • 5xx Server Error: the request was valid but the server failed to fulfill it.
Privacy & processing

All search and filtering happens entirely in your browser. Nothing you type is sent to a server or stored.

The 5 classes at a glance

HTTP status codes fall into 5 classes based on their first digit. Here they are with representative codes.

ClassMeaningRepresentative codes
1xxInformational — request received, processing continues100, 101, 103
2xxSuccess — the request was handled correctly200, 201, 204
3xxRedirection — further action is needed301, 302, 304
4xxClient error — something's wrong with the request400, 401, 404
5xxServer error — the request was valid but the server failed500, 502, 503

Clients (browsers, API libraries) can decide whether to retry, follow a redirect, or treat something as an error just by looking at the first digit, without needing to know every specific code.

Real-world misuse — error bodies under 200, and the 301 vs 302 cache trap

Two common anti-patterns where status codes are used against their intended meaning.

1. Error bodies under 200 — Some APIs return 200 OK even when the request actually failed, signaling the failure only inside the JSON body (e.g. {"error": "..."}). This makes caches, monitoring, and client auto-retry/logging logic all treat the response as a success, forcing every consumer to parse the body just to detect failure. The rule of thumb: use 4xx/5xx for failures and 2xx for success at the status-code level itself.

2. The 301 vs 302 cache trap — Browsers cache 301 Moved Permanently indefinitely, so future requests skip the server entirely and jump straight to the cached target. Ship a 301 with the wrong redirect target and the browser cache can keep the problem alive long after you fix the server (users may need to clear their cache). Conversely, using 301 instead of 302 for a temporary change lets search engines permanently transfer the old URL's SEO value to the new one — hard to undo. Reserve 301 for truly permanent moves, and use 302 or 307 for temporary redirects, A/B tests, or maintenance windows.

HTTP 상태코드란 무엇인가요?
HTTP 상태코드는 서버가 클라이언트의 요청을 처리한 결과를 세 자리 숫자로 알려주는 값입니다. 첫 자리 숫자로 큰 범주(1xx 정보, 2xx 성공, 3xx 리다이렉션, 4xx 클라이언트 오류, 5xx 서버 오류)를 구분하며, 웹 브라우저·API 클라이언트가 이 값을 보고 다음 동작을 결정합니다.
404와 410의 차이는 무엇인가요?
둘 다 리소스를 찾을 수 없다는 뜻이지만, 404 Not Found는 해당 경로에 리소스가 있었는지조차 알 수 없거나 일시적으로 없는 경우에 쓰이고, 410 Gone은 과거에는 존재했지만 의도적으로 영구 삭제되어 다시 나타나지 않을 것임을 명확히 알릴 때 사용합니다.
500 에러가 뜨면 어떻게 해야 하나요?
500 Internal Server Error는 서버 측 코드나 설정 문제로 발생하는 것이므로 클라이언트에서 고칠 수 없습니다. 잠시 후 다시 시도해보고, 반복되면 해당 사이트·서비스 운영자에게 문의하거나 서버 로그를 확인해야 합니다.
상태코드는 총 몇 개이며 이 사전엔 왜 일부만 있나요?
IANA에 등록된 공식 HTTP 상태코드는 60여 개에 이르지만, 이 사전은 실무에서 실제로 자주 마주치는 대표 코드를 1xx~5xx 전 범주에서 선별해 수록했습니다. 자주 쓰이지 않는 코드는 검색 빈도가 낮아 제외했습니다.
HTTP 상태코드의 5개 클래스는 무엇을 의미하나요?
1xx는 정보(처리 계속 진행), 2xx는 성공, 3xx는 리다이렉션(추가 동작 필요), 4xx는 클라이언트 오류, 5xx는 서버 오류입니다. 클라이언트는 세부 코드를 몰라도 첫 자리 클래스만으로 재시도·리다이렉트 추적·오류 처리 여부를 기본적으로 판단할 수 있습니다.
200 응답인데 에러가 발생했다고 표시해도 되나요?
권장되지 않는 안티패턴입니다. 실패했는데도 상태코드를 200으로 두고 본문에만 에러를 담으면 캐시·모니터링·클라이언트의 자동 재시도 로직이 모두 성공으로 오인합니다. 실패는 4xx·5xx로, 성공은 2xx로 상태코드 자체를 정확히 쓰는 것이 원칙입니다.
301과 302 중 무엇을 써야 하나요?
정말 영구적인 이동에만 301을 쓰세요. 301은 브라우저가 영구적으로 캐시하고 검색엔진이 SEO 가치를 새 주소로 영구 이전하기 때문에, 임시 조치인데 301을 쓰면 되돌리기 어렵습니다. 임시 조치·점검 중 리다이렉트에는 302나 307을 쓰는 것이 안전합니다.
What is an HTTP status code?
An HTTP status code is a three-digit number a server returns to tell the client the result of its request. The first digit marks the broad category (1xx informational, 2xx success, 3xx redirection, 4xx client error, 5xx server error), and browsers or API clients use it to decide what to do next.
What's the difference between 404 and 410?
Both mean a resource can't be found, but 404 Not Found is used when the server can't tell whether the resource ever existed at that path, while 410 Gone explicitly states the resource existed before but was intentionally and permanently removed.
What should I do about a 500 error?
A 500 Internal Server Error stems from server-side code or configuration issues, so it can't be fixed from the client. Try again shortly, and if it persists, contact the site or service operator or check server logs.
How many status codes exist, and why does this dictionary only list some?
IANA has registered roughly 60 official HTTP status codes, but this dictionary curates the ones developers actually encounter most often across all five categories (1xx-5xx). Rarely used codes were left out since they're searched far less often.
What do the 5 status code classes mean?
1xx is informational (processing continues), 2xx is success, 3xx is redirection (further action needed), 4xx is client error, and 5xx is server error. A client can decide whether to retry, follow a redirect, or treat something as an error just from the first digit.
Is it OK to return 200 with an error in the body?
This is a discouraged anti-pattern. Keeping the status code at 200 while only signaling failure inside the body makes caches, monitoring, and client auto-retry logic all treat the response as a success. The rule: use 4xx/5xx for failures and 2xx for success at the status-code level.
Should I use 301 or 302?
Reserve 301 for truly permanent moves. Browsers cache 301s indefinitely and search engines permanently transfer SEO value to the new URL, so using 301 for a temporary change is hard to undo. Use 302 or 307 for temporary redirects or maintenance windows.