SQL Splitter Online

Split SQL scripts into statements, objects, or import-ready chunks with ZIP export.

Local only • No execution • Statement-safe boundaries • ZIP export

175 B

How to Use

  1. Paste or upload an SQL script or dump file.
  2. Click Inspect to detect statement count, GO batches, and procedural warnings.
  3. Choose split mode (per statement, per object, by size, or by count) and boundary (semicolon, GO, or custom).
  4. Optionally set export filters and filename templates.
  5. Click Split SQL (or enable auto split).
  6. Preview parts, then download individual files, ZIP, manifest JSON, or index TXT.

Related tools

Frequently Asked Questions

What is an SQL Splitter?

An SQL Splitter breaks one large SQL script into smaller sections—individual statements, object files, or size-limited chunks—without executing SQL or connecting to a database.

Does this tool execute SQL?

No. It never connects to a database and never runs your queries. Splitting is static text analysis only.

Is my SQL uploaded to a server?

No. Inspection, splitting, preview, and ZIP creation run in your browser. Your SQL stays on your device.

How is splitting different from formatting SQL?

Formatting changes whitespace and layout inside one script. Splitting divides a script into multiple output files or sections while preserving statement boundaries.

Can it split SQL dump files?

Yes for reasonably sized dumps pasted or uploaded as .sql files. Very large multi-gigabyte dumps are not practical in-browser; use a CLI tool for those.

Can it split stored procedures?

Use GO batch mode for SQL Server scripts where procedures are terminated with GO. Semicolon mode may split inside procedure bodies—inspect warnings before exporting.

Does it preserve comments?

Yes. Comments remain attached to the statements they belong to. Split boundaries respect comments so semicolons inside comments do not create false splits.

Can it generate one file per table?

Yes. Use One file per object mode with a filename template containing {object}. Each CREATE TABLE (and other CREATE objects) becomes its own file.

Can I download ZIP files?

Yes. Download all split parts as a ZIP archive, plus optional manifest JSON and index TXT summaries.

What is the maximum supported file size?

Small and medium scripts split instantly. Inputs above ~300 KB use a Web Worker. Practical in-browser limit is roughly 5–20 MB depending on your device memory.

Does it support T-SQL GO batches?

Yes. Select GO batch boundary mode. GO must appear on its own line (optional repeat count, e.g. GO 5). GO inside strings or comments is ignored.

Can I use a custom delimiter?

Yes. Custom delimiter mode splits on a whole line matching your delimiter (for example Oracle-style / on its own line).

Which SQL dialects are supported?

Dialect selection helps inspection metadata and integrates with other SQL tools. Boundary splitting is lexical (strings, comments, delimiters) and works across PostgreSQL, MySQL, SQL Server, SQLite, and other scripts.

Does auto-detect dialect work perfectly?

No. It is heuristic only. Confirm the dialect manually when accuracy matters for downstream Validator or Formatter handoffs.

Can I split by file size?

Yes. Max size (KB) per file mode groups whole statements until the approximate byte limit is reached—never cutting mid-statement.

Can I split by statement count?

Yes. N statements per file mode groups consecutive statements into fixed-size batches.

Can I export only DDL or DML?

Yes. Use export filters for DDL only, DML only, or specific object types such as tables, views, or procedures.

Does it handle semicolons inside strings?

Yes. Single-quoted, double-quoted, backtick, and PostgreSQL dollar-quoted strings are respected when splitting on semicolons.

Does it work offline?

Yes. After the page loads, splitting works offline because processing is client-side.

What browsers are supported?

Modern Chromium, Firefox, Safari, and Edge with Web Worker and localStorage support.

Is this tool free?

Yes. No account, usage limit, or per-split charge.

Can I open split parts in other SQL tools?

Yes. Hand off any selected part to the SQL Validator, Formatter, Linter, Explainer, or Compare tools.

What filename templates are available?

Templates support {prefix}, {index}, {total}, {type}, and {object} placeholders for predictable output names.

What is in the manifest JSON?

The manifest lists each output file, statement counts, byte sizes, line ranges, statement types, object keys, and audit statistics.

Can I keep trailing semicolons?

Yes. Toggle Keep trailing semicolon to append ; to statements that lack one when joining parts.

Will identical scripts produce identical splits?

Yes for the same input and options. Splitting is deterministic.

Does it validate SQL syntax before splitting?

No. It splits text by boundaries. Use the SQL Validator handoff to check syntax of individual parts.

Can it split transactions?

BEGIN/COMMIT/ROLLBACK are treated as separate statements in semicolon mode. Dedicated transaction-block grouping may be added later.

Can it preserve dependency order?

Output order matches source order. Full foreign-key topological reordering is not provided in this version.

What keyboard workflow is recommended?

Inspect first for GO or procedural warnings, configure mode, then Split SQL. Enable auto split for live preview while editing.

How is this different from SQL Compare?

Compare highlights differences between two scripts. Splitter divides one script into multiple output files or sections.

Can students use this for learning SQL?

Yes. Splitting migration scripts or classroom examples into one statement per file makes review and practice easier.

Does it use AI?

No. Splitting uses deterministic lexical parsing—no external AI API calls.