Skip to main content
CalculoraCalculora

金融与商业

金融计算器投资与规划个人理财房地产投资商业工具创业与软件企业

数学与技术

数学计算器工程工具物理工具开发者工具学校工具

健康与生活

医疗工具智能工具随机生成器

创作者与专项

创作者经济伊斯兰工具可持续发展游戏

转换器

单位换算器长度换算器重量换算器温度转换器→ 单位换算器

随机生成器

随机数生成器密码强度检测器幸运转盘抛硬币模拟器骰子模拟器时区重叠计算器→ 随机生成器
文件转换器

PDF 工具

将PDF转换为JPG将PDF转换为PNG将 PDF 转换为 TXT将 PDF 转换为 GIF将 PDF 转换为 WebP将 PDF 转换为 SVG将 PDF 转换为 DOCX将PDF转换为Excel将PDF转换为PowerPoint将PDF转换为HTML将PDF转换为Markdown将PDF转换为TIFF

图片转换器

将JPG转换为PNG将PNG转换为JPG将PNG转换为WebP将 WebP 转换为 PNG将 WebP 转换为 JPG将 JPG 转换为 WebP将 SVG 转换为 PNG将SVG转换为JPG将SVG转换为WebP将BMP转换为PNG将BMP转换为JPG将BMP转换为WebP

高级图像

将HEIC转换为JPG将HEIC转换为PNG将TIFF转换为JPG将TIFF转换为PNG将JPG转换为TIFF将PNG转换为TIFF将JPG转换为ICO将PNG转换为ICO将 JPEG 转换为 AVIF将PNG转换为AVIF

GIF 和动画

将GIF帧转换为PNG将GIF帧转换为JPG将 GIF 转换为单个帧 (PNG/JPEG)将 PNG 转换为 GIF将 JPG 转换为 GIF将 GIF 转换为 WebP

编辑

添加水印图像对象移除在浏览器中即时调整图片大小在线压缩图片 — 减小文件大小,保持画质
数学速度挑战心算挑战词汇猜谜宾特和瓦拉德数独2048
货币转换器
CalculoraCalculora

一站式计算器平台。满足各种需求的免费、快速、准确工具。

计算器输入内容100%保密——所有计算都在您的浏览器中进行,绝不会发送到我们的服务器永远免费 — 无付费墙,无订阅,无需账户

热门

  • BMI计算器
  • 贷款计算器
  • 年龄计算器
  • 抵押贷款计算器
  • 百分比计算器
  • 科学计算器

数学

  • 统计计算器
  • 方程求解器
  • 分数计算器
  • 质因数分解计算器
  • 最大公约数与最小公倍数计算器
  • 对数计算器

金融

  • 财务独立提前退休计算器
  • 债务滚雪球计算器
  • 投资计算器
  • 退休计算器
  • 薪资计算器
  • 投资回报率计算器

法律信息

  • 查看全部
  • 分类
  • 货币转换器
  • 网站地图
  • 游戏与趣味工具
  • 关于我们
  • 联系我们
  • 隐私政策
  • 服务条款
  • 免责声明

语言

  • enEnglish
  • arالعربية
  • esEspañol
  • deDeutsch
  • frFrançais
  • hiहिन्दी
  • idBahasa Indonesia
  • itItaliano
  • ja日本語
  • ko한국어
  • ptPortuguês
  • ruРусский
  • trTürkçe
  • viTiếng Việt
  • bnবাংলা
  • zh中文
  • nlNederlands
  • plPolski
  • ukУкраїнська
  • msBahasa Melayu
  • thภาษาไทย

© 2026 Calculora. 版权所有。

使用构建 — 100% 免费

轻量快速——Cookie和分析仅在您同意的情况下运行

  1. 首页
  2. 开发者工具
  3. HTTP 状态码查询

HTTP 状态码查询

查询任意 HTTP 状态码——200、404、500 以及介于两者之间的所有代码——并获得通俗易懂的解释,了解它的含义以及服务器何时会返回它。

什么是HTTP 状态码查询?

HTTP 状态码是 Web 服务器随每个响应返回的三位数字,用于告知客户端(浏览器、应用或 API 调用方)请求是否成功、是否需要重定向或是否失败——以及原因。它们由 IETF 标准化,在每一台 Web 服务器、每一个浏览器和每一种编程语言中都被完全相同地使用,这使其成为软件开发中最通用的调试参考之一。

本查询工具涵盖了全部五大类别中最常见的状态码——信息类(1xx)、成功类(2xx)、重定向类(3xx)、客户端错误类(4xx)和服务器错误类(5xx)——并以通俗易懂的语言解释每个状态码在实践中的真正含义,而不仅仅是正式的 RFC 定义。

公式

1xx:信息性 — 请求已收到,正在继续处理
2xx:成功 — 请求已成功接收并被接受
3xx:重定向 — 需要进一步操作才能完成请求
4xx:客户端错误 — 请求语法有误或无法完成
5xx:服务器错误 — 服务器未能完成一个有效的请求

如何计算

  1. 在搜索框中输入状态码(如 404)或关键词(如 "forbidden")。
  2. 如果想浏览特定区间,可使用 1xx-5xx 按钮按类别筛选。
  3. 阅读该状态码的通俗解释,了解其含义以及通常在何种情况下返回。
  4. 在调试 API 响应或构建错误处理逻辑时,将其作为快速参考。

示例

搜索 "429" 会返回 "Too Many Requests"——当你超过速率限制时,API 会返回该代码,提示你放慢速度并在延迟后重试。

主要优势

  • 在一个可搜索的参考中涵盖所有常用状态码
  • 通俗易懂的解释,而非纯粹的正式 RFC 措辞
  • 按类别(1xx 到 5xx)即时筛选
  • 免费、快速、无需注册

需要避免的常见错误

  • 对实际失败的请求返回 200 OK,从而向监控工具隐藏了错误
  • 混淆 401(未认证)和 403(已认证但无权限)
  • 对本应是永久性的重定向使用 302 而非 301,从而损害 SEO
  • 在客户端错误处理中将所有 4xx 和 5xx 错误一视同仁,而不是根据具体代码分支处理

专业提示

  • 严格将 5xx 代码保留给服务器端故障——绝不要用它们来表示客户端输入错误
  • 在限流时使用带有 Retry-After 头的 429,让规范的客户端知道何时应该重试
  • 当资源确实不存在时,优先使用 404 而不是通用的错误页面——这对用户和搜索引擎都更有利
  • 设计 API 时,选择具体的 4xx 代码(422、409、400),而不是所有情况都默认返回通用的 400

关键术语解释

状态行(Status line):HTTP 响应的第一行,包含状态码和简短的原因短语
幂等(Idempotent):某些 HTTP 方法所具有的属性,即重复相同请求与执行一次的效果相同
重定向链(Redirect chain):浏览器在到达最终资源之前所经历的一系列多次重定向
限流(Rate limiting):限制客户端在给定时间窗口内可以发出的请求数量,通常以 429 表示

常见用例

  • 快速理解你正在集成的 API 返回的陌生状态码
  • 为特定错误情况决定你自己的 API 应返回哪个状态码
  • 通过查看某个特定代码的实际含义来调试请求失败的原因
  • 在 Web 开发课程中教授或学习 HTTP 基础知识
  • 编写能够区分不同 4xx 和 5xx 情况的准确错误处理逻辑

常见问题

不同的 HTTP 状态码区间分别代表什么?
1xx 是信息性状态码,2xx 表示成功,3xx 表示重定向,4xx 表示客户端出错(例如请求了一个不存在的页面),而 5xx 表示服务器本身未能完成一个有效的请求。
401 和 403 有什么区别?
401 Unauthorized 表示你尚未通过身份验证(或凭证无效)——服务器不知道你是谁。403 Forbidden 表示服务器知道你是谁,但你没有访问该资源的权限。
为什么有时页面明显加载失败,我却看到 200?
这通常意味着服务器返回了一个有效的 HTTP 响应(因此是 200 OK),但该响应在应用层面的内容描述了一个错误——这是一种常见模式,一些 API 将错误详情放在响应体中,而不是状态码里。
301 和 302 重定向有什么区别?
301 Moved Permanently 告诉浏览器和搜索引擎更新其记录,此后一直使用新的 URL。302 Found 表示这是一次临时重定向——未来的请求仍应使用原始 URL。

相关工具

纵横比计算器
带宽计算器
下载时间计算器
云托管成本计算器
CDN 成本计算器
应用程序编程接口 货币化计算器
100
Continue
The server has received the request headers and the client should proceed to send the request body.
101
Switching Protocols
The requester has asked the server to switch protocols and the server has agreed to do so.
102
Processing
The server has received and is processing the request, but no response is available yet.
200
OK
The request has succeeded.
201
Created
The request has succeeded and a new resource has been created as a result.
202
Accepted
The request has been received but not yet acted upon.
204
No Content
The server successfully processed the request and is not returning any content.
206
Partial Content
The server is delivering only part of the resource due to a range header sent by the client.
301
Moved Permanently
This and all future requests should be directed to the given URI.
302
Found
Tells the client to look at (browse to) another URL temporarily.
304
Not Modified
Indicates that the resource has not been modified since the version specified by the request headers.
307
Temporary Redirect
The request should be repeated with another URI, but future requests can still use the original URI.
308
Permanent Redirect
The request and all future requests should be repeated using another URI, method not changed.
400
Bad Request
The server cannot or will not process the request due to a client error.
401
Unauthorized
Authentication is required and has failed or has not yet been provided.
403
Forbidden
The request was valid, but the server is refusing action — the client does not have access rights.
404
Not Found
The requested resource could not be found but may be available in the future.
405
Method Not Allowed
A request method is not supported for the requested resource.
408
Request Timeout
The server timed out waiting for the request.
409
Conflict
The request could not be processed because of conflict in the current state of the resource.
410
Gone
The resource requested is no longer available and will not be available again.
413
Payload Too Large
The request is larger than the server is willing or able to process.
414
URI Too Long
The URI provided was too long for the server to process.
415
Unsupported Media Type
The request entity has a media type which the server or resource does not support.
418
I'm a teapot
This code was defined as an April Fools' joke in RFC 2324 and is not expected to be implemented by real servers.
422
Unprocessable Entity
The request was well-formed but was unable to be followed due to semantic errors.
429
Too Many Requests
The user has sent too many requests in a given amount of time (rate limiting).
500
Internal Server Error
A generic error message given when an unexpected condition was encountered.
501
Not Implemented
The server either does not recognize the request method, or it lacks the ability to fulfil it.
502
Bad Gateway
The server was acting as a gateway or proxy and received an invalid response from the upstream server.
503
Service Unavailable
The server cannot handle the request, usually due to maintenance or being overloaded.
504
Gateway Timeout
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.