{
  "schema_version": 2,
  "id": "commands/ping",
  "title": "PING",
  "url": "https://redis.io/docs/latest/commands/ping/",
  "summary": "Returns the server's liveliness response.",
  "since": "1.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-07-24T11:07:00+02:00",
  "page_type": "content",
  "content_hash": "4b3673869f0e4d22188f612107a67394011b7751ab374fbf017dd18de565f3ac",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "This command returns the bulk string `PONG` if no argument is provided, otherwise it returns a copy of the\nprovided `message` as a bulk string.\n\nThis command is useful for:\n1. Testing whether a connection is still alive.\n1. Verifying the server's ability to serve data - an error is returned when this isn't the case (for example, during load from persistence data or accessing a stale replica).\n1. Measuring latency.\n\nIf the client is subscribed to a channel or a pattern, it will instead return a\nmulti-bulk string with `PONG` in the first position and an empty bulk string in the second\nposition, unless an argument is provided, in which case it returns a copy\nof the argument."
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>message</code></summary>\n\nA message to return instead of `PONG`.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> PING\nPONG\nredis> PING \"hello world\"\n\"hello world\""
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nAny of the following:\n* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `PONG` when no argument is provided.\n* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the provided argument.\n\n**RESP3:**\n\nAny of the following:\n* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `PONG` when no argument is provided.\n* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the provided argument."
    }
  ],
  "examples": []
}
