How the SQL to CSV Converter Works
AnyTool parses the SQL entirely in the browser with a string- and paren-aware scanner: it splits statements on top-level semicolons (skipping -- , # and /* */ comments and ignoring semicolons inside strings), reads CREATE TABLE definitions for column names (correctly keeping types like DECIMAL(10,2) and skipping PRIMARY KEY / FOREIGN KEY constraints), and extracts single and multi-row INSERT … VALUES tuples. It handles every dialect's identifier quoting (backtick, double-quote, bracket), schema-qualified names, doubled-quote and backslash escapes, typed string prefixes (N'..', _utf8'..'), values containing commas/newlines/function calls, and keeps SQL NULL distinct from the empty string. A dump with several tables is kept separate so you can export one table or all of them combined.
- Runs client-side — the SQL is never uploaded
- CREATE TABLE + INSERT parsing, single and multi-row
- Multi-table dumps: per-table or combined CSV
- NULL kept distinct from empty string (configurable token)
- Dialect-aware quoting, doubled-quote and backslash escapes
- RFC 4180-correct CSV with delimiter / header / BOM options
