Skip to content
Home
Dev Convert Generate Finance Calc Design Security Media

More categories

Productivity 23 Network Tools 18 Text Tools 16 SEO Tools 15 Education Tools 14 PDF Tools 10 Mockups 5

Learn and build

GuidesBlogAPI & MCPCheatsheetsChangelog All categories

Browse

401 tools · 15 categories

Start here

Popular tools New this week 18 All tools 401

Categories

Developer Tools 92 Converters 49 Finance Tools 31 Generators 31 Calculators 26 Design Tools 25 Media Tools 23 Productivity 23 Security Tools 23 Network Tools 18 Text Tools 16 SEO Tools 15 Education Tools 14 PDF Tools 10 Mockups 5

Learn and build

Guides Cheatsheets Blog REST API MCP server Changelog

No matches here.

Keep FindUtils free Sponsors fund new tools
  1. Cheatsheets
Guides Blog API & MCP
Sponsor
FindUtils
Sponsor
  1. Home
  2. Cheatsheets
  3. Programming
  4. Redis Commands

Programming · Cheatsheet

Redis Commands Cheatsheet

Strings, hashes, lists, sets, sorted sets, pub/sub, streams, and transactions

75 commands 9 sections

On this sheet

Connection & Server 11 String Operations 11 Key Management 11 Hash Operations 9 List Operations 9 Set & Sorted Set 10 Pub/Sub & Streams 6 Transactions & Scripting 7 Sources 1

No entry matches that filter.

Connection & Server

  • redis-cli Connect to local Redis instance
  • redis-cli -h host -p 6379 Connect to remote Redis
  • redis-cli -a password Connect with authentication
  • AUTH password Authenticate after connecting
  • PING Test connection (returns PONG)
  • SELECT 1 Switch to database 1 (0-15)
  • INFO Show server info and statistics
  • INFO memory Show memory usage details
  • DBSIZE Count keys in current database
  • FLUSHDB Delete all keys in current database
  • FLUSHALL Delete all keys in all databases

String Operations

  • SET key value Set a string value
  • GET key Get a string value
  • SET key value EX 3600 Set with expiry (seconds)
  • SET key value NX Set only if key does not exist
  • MSET key1 val1 key2 val2 Set multiple keys at once
  • MGET key1 key2 key3 Get multiple values at once
  • INCR counter Increment integer value by 1
  • INCRBY counter 5 Increment integer by N
  • DECR counter Decrement integer value by 1
  • APPEND key " more" Append string to existing value
  • STRLEN key Get length of string value

Key Management

  • KEYS pattern* Find keys matching pattern (slow)
  • SCAN 0 MATCH pattern* COUNT 100 Iterate keys safely (production-safe)
  • EXISTS key Check if key exists (returns 0/1)
  • DEL key Delete a key
  • UNLINK key Async delete (non-blocking)
  • TYPE key Get the type of a key
  • RENAME key newkey Rename a key
  • EXPIRE key 300 Set TTL in seconds
  • PEXPIRE key 5000 Set TTL in milliseconds
  • TTL key Get remaining TTL in seconds
  • PERSIST key Remove expiry from key

Hash Operations

  • HSET user:1 name "Alice" age 30 Set hash fields
  • HGET user:1 name Get a single hash field
  • HGETALL user:1 Get all fields and values
  • HMGET user:1 name age Get multiple hash fields
  • HDEL user:1 age Delete a hash field
  • HEXISTS user:1 email Check if hash field exists
  • HKEYS user:1 List all hash field names
  • HVALS user:1 List all hash field values
  • HINCRBY user:1 age 1 Increment hash field value

List Operations

  • LPUSH queue item1 item2 Push to head of list
  • RPUSH queue item1 item2 Push to tail of list
  • LPOP queue Pop from head of list
  • RPOP queue Pop from tail of list
  • LRANGE queue 0 -1 Get all items in list
  • LRANGE queue 0 9 Get first 10 items
  • LLEN queue Get list length
  • LINDEX queue 0 Get item at index
  • BLPOP queue 30 Blocking pop (wait up to 30s)

Set & Sorted Set

  • SADD tags "redis" "database" Add members to a set
  • SMEMBERS tags Get all members of a set
  • SISMEMBER tags "redis" Check if member exists in set
  • SCARD tags Get set cardinality (count)
  • SINTER set1 set2 Intersection of two sets
  • SUNION set1 set2 Union of two sets
  • ZADD leaderboard 100 "alice" Add member with score to sorted set
  • ZRANGE leaderboard 0 9 REV WITHSCORES Get top 10 with scores
  • ZRANK leaderboard "alice" Get rank of member (0-based)
  • ZSCORE leaderboard "alice" Get score of member

Pub/Sub & Streams

  • SUBSCRIBE channel Subscribe to a channel
  • PUBLISH channel "message" Publish message to channel
  • PSUBSCRIBE pattern* Subscribe to channels matching pattern
  • XADD stream * field value Add entry to stream
  • XREAD COUNT 10 STREAMS stream 0 Read from stream
  • XLEN stream Get stream length

Transactions & Scripting

  • MULTI Start a transaction
  • EXEC Execute all queued commands
  • DISCARD Discard queued commands
  • WATCH key Watch key for optimistic locking
  • EVAL "return redis.call('GET', KEYS[1])" 1 mykey Execute Lua script
  • BGSAVE Trigger background save to disk
  • BGREWRITEAOF Trigger AOF rewrite

Sources

  • https://redis.io/docs/latest/commands/ Redis command reference: data types, streams, transactions, and command availability.

Related cheatsheets

  • Barcode Formats40 commands
  • JavaScript ES6+59 commands
  • Python Essentials59 commands

Guides that use these commands

  • Convert JSON to SQL INSERT Statements Without Losing TypesGuide · 6 min read
  • Convert a SQL Dump to CSV Without Restoring a DatabaseGuide · 7 min read
  • Convert CSV to SQL for PostgreSQL, MySQL, and SQLiteGuide · 7 min read

From FindUtils

More to explore

Products and services from the team behind FindUtils.

Promote your tool
Featured product seeranks.com SeeRanks — transparent product discovery A public ranking board where paid placement is always labeled and every product keeps its earned position. View SeeRanks Public rank board #1 Sponsored #2 #3 #4 Paid placement is always labeled Free favicon tool emojifavicons.com Emoji Favicons Turn any emoji into a favicon with one HTML line. SVG, PNG or ICO, no sign-up. <link rel="icon" href=".../🦊.svg"> Create a favicon
FindUtils service findutils.com Articles for software tools A sourced article for your channels, or a sponsored FindUtils publication with editorial review. Compare packages Domain portfolio findutils.com Domain names for sale .com.dev.sh.app.io Unused names across dev tools, AI, PDF and commerce. Make an offer. Browse the list Playable ranking towerscore.io TowerScore — stack the skyline Play to climb, or buy a floor. Paid floors are labeled. Open TowerScore

Missing a tool you need?

Tell us what to build next. Most requests ship as a free browser tool, an API endpoint and an MCP tool.

Request a tool
FindUtils

Free, fast utilities that respect your data. Most tools process your files in the browser, so they never leave your device.

  • No sign-up for free tools
  • Most tools run in your browser
  • 349 tools on the REST API and MCP

Tools

DevelopersConvertPDFDesignSecurityAll tools →

Learn

GuidesBlogCheatsheetsChangelog

Build

REST APIMCP serverAPI referenceWorkflowsStatus

FindUtils

AboutLibraries we useSponsorRequest a toolDomains for saleContact
© 2026 FindUtils PrivacyTermsSitemap
Service status
FindUtils

Free, fast utilities that respect your data. Most tools run in your browser.

Build with it

REST APIMCP serverGuidesChangelog

FindUtils

AboutSponsorPrivacyContact
Theme
© 2026 FindUtils Terms
FindUtils
Guides Blog REST API MCP server Changelog

Categories

Developers 92 Convert 49 Finance 31 Generate 31 Calculate 26 Design 25
All 15 categories →

Keep it free

Sponsorship keeps every tool free and funds the new ones we ship each week.

Sponsor Back the project
Tools API Sponsor