Messaging protocols

Redis command wire encoder

Encode JSON arrays of string arguments as a RESP2 command pipeline.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

Encode each command as an array of bulk strings. Prefix each argument with its UTF-8 byte length and terminate fields with CRLF.

SET k é uses three bulk strings; é counts as two bytes. The following GET k makes two commands in one stream.

Limits

Command framing only. Arguments must be strings; commands are not validated or sent. Empty command lists produce an empty stream. No authentication or server access.