Simple String
RESP2prefix: + · client type: String / str in most languages
Simple strings are non-binary-safe strings terminated by CRLF. The + prefix signals a single-line string that cannot contain \r or \n characters. Used for short server replies like +OK, +PONG, and +QUEUED. For binary-safe string data, use bulk strings ($).
Details
Simple strings use the format +<string>\r\n. They are efficient for short status replies because they do not require a length prefix – the CRLF terminator marks the end.
Because simple strings cannot contain \r or \n, they are not suitable for arbitrary data. For binary data, Redis uses bulk strings ($) which include an explicit length prefix.
Common simple string replies: +OK – successful write operation (SET, HSET, etc.) +PONG – response to PING command +QUEUED – command queued in a MULTI/EXEC transaction +NONE – some commands return +NONE for no-result
Note: in RESP3, simple strings remain valid. The server may return simple strings or blob strings depending on the command and context.
Wire encoding
+OK\r\n +PONG\r\n +QUEUED\r\n
Type information
| Prefix byte | + |
| Version | RESP2 |
| Client type | String / str in most languages |
| Specification | RESP3 specification (GitHub) → |