Skip to content
migration.tools
Any SQL to Any SQL

SQL dialect converter

One converter for all twelve directions between MySQL, PostgreSQL, SQLite and SQL Server. It parses your CREATE TABLE statements into a neutral model, then writes them back out in the target dialect — so types, keys, defaults and identity columns are translated, not find-and-replaced.

Going the other way? Any SQL to Any SQL

Options

Source SQL

Converted SQL

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your Any SQL or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the Any SQL or download it. Drop several files to convert a batch into one ZIP.

How the conversion works

The SQL is tokenised with the source database's own rules — backticks, brackets, dollar quotes, backslash escapes, GO separators — so strings and identifiers are never confused with keywords.

CREATE TABLE statements, plus the ALTER TABLE and CREATE INDEX statements that dump tools emit separately, are merged into one model per table: columns with a canonical type, nullability, default and identity flag; primary key; indexes; foreign keys; checks.

That model is written in the target dialect. Foreign keys are emitted last so tables can be created in any order, INSERT values are converted with knowledge of each column's type, and anything that can't be translated safely is passed through and listed in the review notes rather than guessed at.

Type mapping at a glance

Booleans: TINYINT(1) ↔ BOOLEAN ↔ BIT ↔ INTEGER. Auto-increment: AUTO_INCREMENT ↔ IDENTITY / SERIAL ↔ IDENTITY(1,1) ↔ AUTOINCREMENT. Long text: LONGTEXT ↔ TEXT ↔ NVARCHAR(MAX). Binary: LONGBLOB ↔ BYTEA ↔ VARBINARY(MAX) ↔ BLOB. JSON: JSON ↔ JSONB ↔ NVARCHAR(MAX) ↔ TEXT. UUID: CHAR(36) ↔ UUID ↔ UNIQUEIDENTIFIER ↔ TEXT.

Where the target type is narrower than the source — unsigned integers, unlimited-precision numerics, time zones — the converter picks the wider safe option and tells you.

Questions

Is Oracle supported?

Not yet. The four supported databases are MySQL/MariaDB, PostgreSQL, SQLite and SQL Server. Oracle's NUMBER and VARCHAR2 types are recognised when reading, but PL/SQL-specific syntax isn't translated.

Can it convert individual queries?

Yes, on a best-effort basis: identifier quoting, LIMIT/OFFSET/TOP, and common functions such as IFNULL, ISNULL, NOW and GETDATE are translated. Functions whose arguments differ between databases are flagged for review instead of being silently renamed.

Guides that use this tool