Referencia de Códigos de Estado HTTP - Lista Completa de Códigos de Respuesta HTTP en Línea
Busque, filtre y copie todos los códigos de estado HTTP (1xx-5xx) con descripciones, casos de uso y ejemplos de respuesta. Referencia interactiva — 100% del lado del cliente, no se envían datos al servidor.
61 códigos de estado encontrados
The server is switching protocols as requested by the client.
The server has received and is processing the request, but no response is available yet.
Used to return response headers before the final HTTP message.
The request succeeded.
The request succeeded and a new resource was created.
The request has been accepted for processing, but processing is not complete.
The returned metadata is not exactly the same as available from the origin server.
The server successfully processed the request but is not returning any content.
The server successfully processed the request and asks the client to reset the document view.
The server is delivering only part of the resource due to a range header sent by the client.
The message body contains multiple status codes for different operations.
The members of a DAV binding have already been enumerated in a previous reply.
The server has fulfilled a GET request for the resource with instance manipulations applied.
The request has more than one possible response.
The URL of the requested resource has been changed permanently.
The URI of requested resource has been changed temporarily.
The server sent this response to direct the client to get the requested resource at another URI with a GET request.
The resource has not been modified since the version specified by the request headers.
The server sends this response to redirect the client, guaranteeing the same HTTP method will be used.
The resource has been permanently moved, and the same HTTP method must be used.
The server cannot process the request due to something perceived to be a client error.
The client must authenticate itself to get the requested response.
Reserved for future use. Originally created for digital payment systems.
The client does not have access rights to the content.
The server cannot find the requested resource.
The request method is known by the server but is not supported by the target resource.
The server cannot produce a response matching the list of acceptable values defined in the request headers.
The client must first authenticate itself with the proxy.
The server timed out waiting for the request.
The request conflicts with the current state of the server.
The content has been permanently deleted from the server with no forwarding address.
The server rejects the request because the Content-Length header field is not defined.
The client has indicated preconditions in its headers which the server does not meet.
The request entity is larger than limits defined by the server.
The URI requested by the client is longer than the server is willing to interpret.
The media format of the requested data is not supported by the server.
The range specified by the Range header field in the request cannot be fulfilled.
The expectation given in the Expect request header could not be met by the server.
The server refuses the attempt to brew coffee with a teapot.
The request was directed at a server that is not able to produce a response.
The request was well-formed but was unable to be followed due to semantic errors.
The resource that is being accessed is locked.
The request failed because it depended on another request that failed.
The server is unwilling to risk processing a request that might be replayed.
The server refuses to perform the request using the current protocol.
The origin server requires the request to be conditional.
The user has sent too many requests in a given amount of time (rate limiting).
The server is unwilling to process the request because its header fields are too large.
The user agent requested a resource that cannot legally be provided.
The server has encountered a situation it does not know how to handle.
The request method is not supported by the server and cannot be handled.
The server got an invalid response while working as a gateway.
The server is not ready to handle the request.
The server is acting as a gateway and cannot get a response in time.
The HTTP version used in the request is not supported by the server.
The server has an internal configuration error during content negotiation.
The server is unable to store the representation needed to complete the request.
The server detected an infinite loop while processing the request.
Further extensions to the request are required for the server to fulfill it.
The client needs to authenticate to gain network access.
Preguntas frecuentes
¿Qué son los códigos de estado HTTP?
Los códigos de estado HTTP son números de tres dígitos devueltos por un servidor web en respuesta a la solicitud de un cliente. Indican si la solicitud fue exitosa, redirigida o resultó en un error. Los códigos de estado se agrupan en cinco clases: 1xx (Informativo), 2xx (Éxito), 3xx (Redirección), 4xx (Error del cliente) y 5xx (Error del servidor). Están definidos por la IETF en RFC 9110 y son fundamentales para el funcionamiento de la web.
¿Cómo uso esta herramienta de referencia de códigos de estado HTTP?
Ingrese un número de código de estado (por ejemplo, '404') o una palabra clave (por ejemplo, 'not found' o 'redirect') en la barra de búsqueda para encontrar los códigos relevantes al instante. También puede filtrar por categoría usando los botones 1xx-5xx. Haga clic en cualquier tarjeta de código de estado para expandirla y ver la descripción completa, el caso de uso común y un ejemplo de respuesta que puede copiar. Use los botones de copiar para obtener rápidamente el código o fragmento para su proyecto.
¿Están seguros mis datos? ¿Se envía algo a un servidor?
Esta herramienta es 100% del lado del cliente. Todos los datos de códigos de estado HTTP están incrustados estáticamente en la página — no hay llamadas API, ni solicitudes al servidor, ni recopilación de datos. Sus consultas de búsqueda e interacciones nunca salen de su navegador. La herramienta funciona completamente sin conexión después de la carga inicial de la página.
¿Cuál es la diferencia entre 401 Unauthorized y 403 Forbidden?
401 Unauthorized significa que la solicitud carece de credenciales de autenticación válidas — el cliente no se ha identificado. El servidor dice 'No sé quién eres; por favor autentícate.' 403 Forbidden significa que el servidor sabe quién eres (puedes estar autenticado) pero no tienes permiso para acceder al recurso. El servidor dice 'Sé quién eres, pero no tienes permiso.'
¿Cuál es la diferencia entre las redirecciones 301 y 308?
Ambas indican una redirección permanente. 301 Moved Permanently permite que el método HTTP cambie en la redirección (por ejemplo, POST puede convertirse en GET). 308 Permanent Redirect preserva el método HTTP original. Para APIs que usan POST/PUT, 308 es la opción más segura. De manera similar, 302 vs 307: 302 Found permite el cambio de método, mientras que 307 Temporary Redirect lo preserva.
¿Por qué existe el código de estado 418 'I'm a teapot'?
418 I'm a teapot fue definido en RFC 2324 como una broma del Día de los Inocentes en 1998 como parte del Hyper Text Coffee Pot Control Protocol (HTCPCP). Aunque no es un código de estado HTTP real desde una perspectiva de estándares, ha sido ampliamente adoptado como un huevo de Pascua y es reconocido por muchas bibliotecas y frameworks HTTP. Se incluye en esta referencia para completitud.
¿Qué son los códigos de estado WebDAV?
WebDAV (Web Distributed Authoring and Versioning) es una extensión de HTTP que permite a los clientes realizar la creación de contenido web remoto. Introduce códigos de estado adicionales como 207 Multi-Status, 422 Unprocessable Content, 423 Locked, 424 Failed Dependency, 507 Insufficient Storage y 508 Loop Detected. Estos códigos están definidos en RFC 4918 y se usan comúnmente en APIs REST modernas (especialmente 422 para errores de validación).
Ejemplos de código
// 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 };
}
}