REDIS-CLI TERMINAL
Redis Online Editor [v1.0.0] Connected to local in-memory instance. Type 'HELP' for commands or scroll down for examples.
>
KEY SPACE0 KEYS
KeyTypeValue Preview
Database is empty

Live Examples

Learn Redis best practices through real-world scenarios. Click "Run It" to execute code in the terminal.

1. Caching & Counters
Based on String Type

Scenario A: Cache User Session

SET session:userid:1001 "x8s7-token-value"
GET session:userid:1001

Scenario B: Article Page Views

SET article:99:views 0
INCR article:99:views
INCR article:99:views
2. Object Storage
Based on Hash Type

Scenario: Store Product Details

-- Set name, price, and stock
HSET product:42 name "Mechanical Keyboard" price 120 stock 50
-- Decrease stock by 1
HINCRBY product:42 stock -1
-- Read all product info
HGETALL product:42
3. Task Queue
Based on List Type

Scenario: Email Send Queue

-- Add tasks (Producer)
LPUSH mail_queue "email_to_alice"
LPUSH mail_queue "email_to_bob"
-- Process task (Consumer)
RPOP mail_queue

Scenario: Latest 5 System Logs

LPUSH logs "Error: Connection lost"
LPUSH logs "Info: User logged in"
LPUSH logs "Warning: High memory"
LRANGE logs 0 4
4. Tags & Deduplication
Based on Set Type

Scenario: User Skills

-- Add skills
SADD user:1001:skills "Java" "Python" "Redis"
-- Try adding "Redis" again (ignored)
SADD user:1001:skills "Redis"
-- Check if user knows Python
SISMEMBER user:1001:skills "Python"
-- List all skills
SMEMBERS user:1001:skills
5. Data Lifecycle
Based on Key Management

Scenario: Phone OTP Code

-- Set OTP 123456
SET phone:138000:code "123456"
-- Expire in 60s
EXPIRE phone:138000:code 60
-- Check remaining time
TTL phone:138000:code

What is Redis?

Redis (Remote Dictionary Server) is an open-source, in-memory data structure store, used as a database, cache, and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets, etc. Due to its high performance (handling hundreds of thousands of operations per second), Redis is a vital component of modern internet architecture.

High PerformanceIn-MemoryKey-ValueNoSQL
Run Online
No installation required, instant browser experience

This Redis online editor is built with pure frontend technology, providing a simulated Redis environment. You can type commands directly in your browser and see results instantly, perfect for learning syntax and testing logic.

Visual Management
Visualize key-value data

Includes not only a CLI terminal but also a real-time key visualization panel. You can clearly see all keys, types, and values in the database without repeatedly typing `KEYS *`.

Data Security
Local execution, privacy guaranteed

All data is stored only in your browser memory. Data resets on page refresh. No commands or data are uploaded to the server, ensuring your learning process is completely safe and private.

Common Redis Commands Cheat Sheet

String is the most basic Redis type. A key corresponds to a value. Max 512MB.

CommandExampleDescription
SETSET name "Redis"Set the value of a key
GETGET nameGet the value of a key
INCRINCR viewsIncrement value by 1 (Atomic)
DECRDECR stockDecrement value by 1

FAQ

Does this support persistence?

No. This is a pure frontend simulation. Data resets on refresh. Use local Redis or Cloud for persistence.

Are all commands supported?

We support core commands (SET, GET, LPUSH, SADD, etc.). Advanced commands (Pub/Sub, Scripting) are not yet supported.

Can I use this on mobile?

Yes, the UI is responsive, but a physical keyboard is recommended for typing commands.

Is my data safe?

Absolutely. This is a pure frontend application. All data is stored only in your browser's memory and is never uploaded to any server.