Skip to content

EVM Playground

Write bytecode and step through execution in real-time.

Examples:

Smart Assistant

"Currently at PUSH instruction. It's going to place a value on top of the stack."
Tip: Observe how the stack grows after the next step.

Program

10 bytes
0000
PUSH10x42
Place 1-byte item on stack
0002
PUSH10x00
0004
MSTORE
0005
PUSH10x20
0007
PUSH10x00
0009
RETURN

Gas Meter

Consumed0 / 1,000,000
Last Op Cost
-0
Refund
0
* Gas prevents infinite loops and DDoS. SSTORE is the most expensive opcode (20,000 gas for new slots).

Status

idlePC: 0
Stack Depth
0 / 1024

Stack

LIFO
0 / 1024
Stack is empty

Most opcodes pop their arguments from here.

Storage

Persistent
Storage is empty

Use SSTORE to persist data across transactions.

Storage is a key-value store. In Solidity, variables are mapped to slots (0, 1, 2...) or hashed for mappings/arrays.

Memory

0 bytes
00-0708-1516-2324-31
Memory is uninitialized
Memory is byte-addressable and volatile. It expands as you write to new offsets.

How to Use the Playground

1What to Do

  1. Click an Example above (like "Simple Add" or "Memory")
  2. Click Step to run one instruction at a time
  3. Watch how values move between Stack, Memory, and Storage
  4. Click Undo to go back and try again

2What to Observe

→

PC (Program Counter): Shows which instruction runs next

→

Stack: Values pushed/popped like a stack of plates

→

Memory: Data stored temporarily at byte offsets

→

Gas: Computational cost (storage = expensive!)

3What to Learn

6002600301

Simple math: Push 5, push 4, multiply = 20, push 3, add = 23

604260005260206000f3

Store value 42 at memory position 0, then return 32 bytes from position 0

60ff600055

Write 255 to storage slot 0. This persists on blockchain (costs ~20k gas!)