Build Redis command

Build a Redis command with correctly ordered keys, values, and expiry options.

freeworks offlinenothing uploaded
ToolRedis Command Builder
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A selected command and arguments are arranged according to Redis command documentation; values containing spaces are escaped for the preview. The result is text and does not connect to Redis.

  • Command names and argument order follow Redis docs.
  • Optional flags remain explicit because they change expiry or key access.

Worked example

Cache Session Data
Build a Redis SET command with TTL for session caching
Input
											Operation: set
Key: session:user123
Value: {"userId": 123, "role": "admin"}
TTL: 3600
										
Output
												SET session:user123 "{"userId": 123, "role": "admin"}" EX 3600
											

When to use this

Cache debugging, expiry runbooks, and queue operations build Redis commands.

Edge cases

  • Shell quoting and Redis protocol tokenization are different layers.
  • EX and PX use different time units.
  • DEL and FLUSH can remove data even when syntax is valid.

References