> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# HSTRLEN

> Returns the string length of a value in a hash.

## Arguments

<ParamField body="key" type="str" required>
  The key of the hash.
</ParamField>

<ParamField body="field" type="str" required>
  The name of the field.
</ParamField>

## Response

<ResponseField type="int" required>
  `0` if the hash or field does not exist. Otherwise the length of the string.
</ResponseField>

<RequestExample>
  ```py Example theme={"system"}
  length = redis.hstrlen("key", "field")
  ```
</RequestExample>
