Don't trust the SQL. Run it.

Every LLM can write SQL. None of them can know it's correct. Paste a schema and a query — this page spins up a real in-memory database in your browser and executes it. Real error messages, real results, zero guessing. Nothing leaves your machine.

press RUN (or Ctrl+Enter) — the preloaded query has a bug an LLM would happily ship

// for AI agents

The same engine runs as a paid MCP server. Your agent writes SQL; sqlai.dev executes it in an ephemeral sandbox and returns ground truth — rows, typed errors with positions and suggestions, query plans, or a result-set diff. Per-call payment over x402, no account, no API key. 20 calls/day free so agents can try before their operators approve spend.

toolwhat it returnsprice
run_sqlrows (≤500), columns+types, row_count, dialect notes$0.005
validate_sqlok / typed error with position + suggestion, referenced tables$0.003
explain_planengine-native query plan, full-scan warnings$0.003
run_sql_batchup to 10 isolated run_sql results$0.02
diff_resultsare two queries' result sets equal? row-level diff$0.008

Add it to your agent:

{
  "mcpServers": {
    "sql-verifier": {
      "type": "http",
      "url": "https://mcp.sqlai.dev/mcp"
    }
  }
}

Server-side engine is SQLite (same WASM build as this page). DuckDB verification is browser-only for now — Worker size limits, documented honestly in the docs.