Oh MyUtils

HTTP Status Codes Reference - Complete HTTP Response Code List Online

Search, filter, and copy all HTTP status codes (1xx-5xx) with descriptions, use cases, and response examples. Interactive reference — 100% client-side, no data sent to server.

61 status codes found

Frequently Asked Questions

What are HTTP status codes?

HTTP status codes are three-digit numbers returned by a web server in response to a client's request. They indicate whether the request was successful, redirected, or resulted in an error. Status codes are grouped into five classes: 1xx (Informational), 2xx (Success), 3xx (Redirection), 4xx (Client Error), and 5xx (Server Error). They are defined by the IETF in RFC 9110 and are fundamental to how the web works.

How do I use this HTTP status codes reference tool?

Enter a status code number (e.g., '404') or a keyword (e.g., 'not found' or 'redirect') in the search bar to find the relevant codes instantly. You can also filter by category using the 1xx-5xx buttons. Click on any status code card to expand it and see the full description, common use case, and a copyable response example. Use the copy buttons to quickly grab the code or snippet for your project.

Is my data safe? Does anything get sent to a server?

This tool is 100% client-side. All HTTP status code data is statically embedded in the page — there are no API calls, no server requests, and no data collection. Your search queries and interactions never leave your browser. The tool works fully offline after the initial page load.

What is the difference between 401 Unauthorized and 403 Forbidden?

401 Unauthorized means the request lacks valid authentication credentials — the client has not identified itself. The server is saying 'I don't know who you are; please authenticate.' 403 Forbidden means the server knows who you are (you may be authenticated) but you do not have permission to access the resource. The server is saying 'I know who you are, but you're not allowed.'

What is the difference between 301 and 308 redirects?

Both indicate a permanent redirect. 301 Moved Permanently allows the HTTP method to change on redirect (e.g., POST may become GET). 308 Permanent Redirect preserves the original HTTP method. For APIs that use POST/PUT, 308 is the safer choice. Similarly, 302 vs 307: 302 Found allows method change, while 307 Temporary Redirect preserves it.

Why does the 418 'I'm a teapot' status code exist?

418 I'm a teapot was defined in RFC 2324 as an April Fools' joke in 1998 as part of the Hyper Text Coffee Pot Control Protocol (HTCPCP). While not a real HTTP status code from a standards perspective, it has been widely adopted as an Easter egg and is recognized by many HTTP libraries and frameworks. It is included in this reference for completeness.

What are WebDAV status codes?

WebDAV (Web Distributed Authoring and Versioning) is an extension of HTTP that allows clients to perform remote web content authoring. It introduces additional status codes like 207 Multi-Status, 422 Unprocessable Content, 423 Locked, 424 Failed Dependency, 507 Insufficient Storage, and 508 Loop Detected. These codes are defined in RFC 4918 and are commonly used in modern REST APIs (especially 422 for validation errors).

Code Examples

// HTTP Status Code lookup

const HTTP_STATUS_CATEGORIES = {
  '1xx': 'Informational',
  '2xx': 'Success',
  '3xx': 'Redirection',
  '4xx': 'Client Error',
  '5xx': 'Server Error',
};

function getStatusCategory(code) {
  if (code >= 100 && code < 200) return '1xx';
  if (code >= 200 && code < 300) return '2xx';
  if (code >= 300 && code < 400) return '3xx';
  if (code >= 400 && code < 500) return '4xx';
  if (code >= 500 && code < 600) return '5xx';
  return 'Unknown';
}

const STATUS_CODES = {
  200: 'OK',
  201: 'Created',
  204: 'No Content',
  301: 'Moved Permanently',
  302: 'Found',
  304: 'Not Modified',
  400: 'Bad Request',
  401: 'Unauthorized',
  403: 'Forbidden',
  404: 'Not Found',
  405: 'Method Not Allowed',
  409: 'Conflict',
  422: 'Unprocessable Content',
  429: 'Too Many Requests',
  500: 'Internal Server Error',
  502: 'Bad Gateway',
  503: 'Service Unavailable',
};

async function fetchWithStatusHandling(url, options = {}) {
  try {
    const response = await fetch(url, options);
    const category = getStatusCategory(response.status);
    switch (category) {
      case '2xx':
        if (response.status === 204) return { data: null, status: 204 };
        return { data: await response.json(), status: response.status };
      case '4xx':
        const clientError = await response.json().catch(() => ({}));
        throw {
          status: response.status,
          statusText: STATUS_CODES[response.status] || response.statusText,
          message: clientError.message || `Client error: ${response.status}`,
          isRetryable: response.status === 429,
          retryAfter: response.headers.get('Retry-After'),
        };
      case '5xx':
        throw {
          status: response.status,
          statusText: STATUS_CODES[response.status] || response.statusText,
          message: `Server error: ${response.status}`,
          isRetryable: [502, 503, 504].includes(response.status),
        };
      default:
        throw new Error(`Unexpected status code: ${response.status}`);
    }
  } catch (error) {
    if (error.status) throw error;
    throw { status: 0, message: 'Network error', isRetryable: true };
  }
}

Related Tools

IP Subnet Calculator - IPv4 & IPv6 CIDR Calculator Online
HTTP Header Analyzer - Parse & Audit Security Headers Online
JSON Formatter & Validator - Beautify JSON Online
SQL Formatter & Beautifier - Format SQL Queries Online
Code Minifier - Minify JavaScript, CSS & HTML Online
SVG to JSX Converter - Convert SVG to React Component Online