SQLite Bytecode Explorer

Visualize and understand the virtual machine instructions SQLite generates for your SQL queries

How SQLite Executes Queries

SQLite compiles every SQL statement into a program for its built-in Virtual Database Engine (VDBE). The VDBE is a register-based virtual machine — each instruction (opcode) operates on numbered registers (like r[2]) rather than a stack. When you call sqlite3_prepare_v2(), SQLite parses your SQL and generates this bytecode program. Then sqlite3_step() executes it one instruction at a time.

Use EXPLAIN before any SQL statement to see its bytecode. This tool runs EXPLAIN for you and annotates each opcode with a human-readable explanation.

Schema Setup (optional — define tables/indexes so EXPLAIN can reference them)
These CREATE TABLE / CREATE INDEX statements set up the database schema so that EXPLAIN output reflects real query plans.
Loading SQLite WASM...