01What is Redis Command Builder?
This tool is a scratchpad for writing a short redis-cli script. You click commands, type their arguments, and copy the finished lines. It never talks to a Redis server. Commands sit in six tabs. Strings has SET, GET, MSET, MGET, INCR, INCRBY, APPEND and STRLEN. Hashes has HSET, HGET, HGETALL, HDEL, HEXISTS and HINCRBY. Lists covers LPUSH, RPUSH, LPOP, RPOP, LRANGE and LLEN. Sets covers SADD, SREM, SMEMBERS, SISMEMBER, SUNION and SINTER. Sorted Sets has ZADD, ZRANGE, ZRANK, ZSCORE, ZREM and ZCARD, and Keys has DEL, EXISTS, EXPIRE, TTL, KEYS and SCAN. Each button shows a one-line description. Clicking it adds an empty row to your command list. The empty input shows the argument syntax from the Redis command reference as a placeholder. For ZRANGE that's key start stop [BYSCORE|BYLEX] [REV] [LIMIT offset count] [WITHSCORES], which saves a trip to the docs. Whatever you type is passed through untouched. The Redis Commands panel joins each command name with its arguments, one command per line. The one thing it does check is quoting. redis-cli splits arguments on spaces unless they sit inside double or single quotes, and a backslash escapes a quote inside double quotes. If a row has a quote that never closes, the field turns red and a warning says redis-cli would reject the line. That catches a classic slip: typing it's without quotes opens a single-quoted string that never ends. For example, SET with the arguments user:1 "John Doe" EX 60 copies out as exactly that line, with no warning. Drop the closing quote and you get the red outline instead. The presets give you three starting points. String SET shows a key with a one-hour TTL and a session key set with NX and EX. Hash operations writes a user hash with HSET and reads it back with HGETALL. Sorted set adds three players with ZADD and lists them highest first using ZRANGE with WITHSCORES and REV. REV on ZRANGE needs Redis 6.2 or newer, per the Redis docs. Be clear about the limits. The builder doesn't count or order arguments, so ZADD with a missing score looks fine here and fails in Redis. It also has no idea what data your server holds. Commands you build stay in the page until you paste them somewhere yourself.
Backend developers who want a correctly quoted redis-cli script for seeding, debugging or a runbook without opening the Redis docs for every command. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Redis Command Builder
- Load the String SET, Hash operations or Sorted set preset, or start from the two SET commands shown by default.
- Pick a tab (Strings, Hashes, Lists, Sets, Sorted Sets or Keys) and click a command button to add it to the list.
- Type the arguments into that row's input, following the syntax shown in the placeholder.
- Fix any row outlined in red, then remove unwanted rows with the x button.
- Click Copy to grab everything in the Redis Commands panel, or press the reset button to return to the SET preset.
03Worked examples
- Input:
SET with args: user:1 "John Doe" EX 60 - Result:
SET user:1 "John Doe" EX 60 - The quotes keep John Doe as one value. Without them redis-cli would see two arguments.
- Input:
SET with args: greeting "unclosed value - Result:
SET greeting "unclosed value (field outlined red) A command has an unclosed quote; redis-cli will reject it with "Invalid argument(s)". - The line still appears in the output, but the warning tells you it won't run.
- Input:
SET with args: note it's - Result:
SET note it's (unclosed-quote warning shown) - A lone apostrophe opens a single-quoted string. Write "it's" in double quotes instead.
- Input:
SET with args: msg "say \"hi\"" - Result:
SET msg "say \"hi\"" - No warning. A backslash escapes the quote inside double quotes, so the string is balanced.
- Input:
ZADD args: leaderboard 100 player1 95 player2 ZRANGE args: leaderboard 0 -1 WITHSCORES REV - Result:
ZADD leaderboard 100 player1 95 player2 ZRANGE leaderboard 0 -1 WITHSCORES REV - Two rows become two lines. REV returns the highest score first and needs Redis 6.2 or newer.
- Input:
SCAN args: 0 MATCH user:* COUNT 100 TTL args: session:abc123 - Result:
SCAN 0 MATCH user:* COUNT 100 TTL session:abc123 - Arguments are copied exactly as typed. The builder does not check them against a live server.
04Common use cases
- Drafting the commands that seed a local Redis with a test user hash, a few sessions and a leaderboard
- Writing a short runbook of redis-cli lines, such as TTL and SCAN checks, for a teammate on call
- Checking a value with spaces or apostrophes is quoted correctly before pasting it into redis-cli
- Comparing data types for a feature, for example a hash for a profile versus a sorted set for rankings
- Putting together a multi-line script to paste into the RedisInsight workbench
- Looking up argument order for ZRANGE or SET options without leaving the page
05Tips
- Prefer SCAN 0 MATCH user:* COUNT 100 over KEYS in production. The Redis docs warn KEYS can block the server on large keyspaces.
- SET key value NX EX 30 creates a key only if it's missing and gives it a TTL in one atomic step, which is the basis of a simple lock.
- Wrap values with apostrophes in double quotes, like "it's fine", or redis-cli will treat the apostrophe as the start of a quoted string.
- Inside double quotes, write \" for a literal quote. The builder knows this escape and won't flag it.
- Use colon-separated names like user:1001:profile so related keys group together in GUI tools and MATCH patterns.
06Related concepts
Redis data types, redis-cli, Sorted sets, TTL, Key naming.
Frequently Asked Questions
What is Redis Command Builder?
Redis Command Builder is a free, browser-based developer tool on AIDToolStack. Build Redis commands with docs It requires no installation or sign-up and works entirely in your browser.
Is Redis Command Builder free to use?
Yes. No sign-up, no fees and no usage cap.
Does Redis Command Builder store my data?
No. It runs in your browser; nothing is uploaded.