How SQL Splitter works
Paste a multi-statement migration and get each statement as its own labelled card (CREATE TABLE, CREATE FUNCTION, CREATE TRIGGER, ALTER, and so on) with a Copy button, so you can run them one at a time in the Supabase SQL editor. The split is dollar-quote aware, so a PL/pgSQL function body is never cut in half on the semicolons inside it.
A quote-aware tokenizer splits on top-level semicolons only, ignoring ';' inside strings, comments, and $$ dollar-quoted bodies. Runs entirely in your browser.
Questions
- Why not just split on semicolons?
- Because a PL/pgSQL function body ($$ ... $$) contains its own semicolons. A naive split breaks the function in half. This splitter ignores semicolons inside strings, comments, and dollar-quoted bodies.
- Is my SQL uploaded?
- No. The whole split runs in your browser. Nothing leaves your device.
- What are the labels for?
- Each statement gets a best-effort label (CREATE TABLE, CREATE FUNCTION, ALTER, INSERT, and so on) by its leading keyword, so a long migration is easy to scan.
- Can I copy everything at once?
- Yes. Use Copy all (joined) for the whole script, or the per-card Copy button to grab a single statement.
More Text & Data tools
- .env InspectorInspect, mask, and convert env files
- JSONPath ExplorerPull a value out of JSON by path
- cURL → fetchConvert curl commands to fetch()
- Markdown PreviewerLive GitHub-flavored markdown
- JSON FormatterValidate and pretty-print
- Base64Encode and decode
- Diff CheckerCompare two text blocks
- Word CountCount, readability, stats
- TimestampUnix, ISO 8601, relative time
- Hash GeneratorSHA-1, SHA-256, SHA-512
- URL EncoderEncode, decode, parse URLs
- Text CaseUPPER, lower, Title, camelCase, more
- Character EntitiesHTML entities, Unicode, ASCII lookup
- JSON to TypeScriptGenerate TypeScript interfaces from JSON
- JWT DecoderInspect JSON Web Tokens
- Page WeightWeigh a page: bytes, grade, Core Web Vitals, HAR diff
- SQL Viewer & CopyOpen a .sql file, read it, copy it
- SQL Formatter & MinifyBeautify or compact SQL
- SQL Pre-flight CheckCatch RLS gaps & risky SQL
- Base ConverterBinary, octal, decimal, hex, bitwise
- Unicode InspectorCode points, bytes, invisible characters