Free Developer Tool — 100% In-Browser

SQL Converter

Convert schemas and statements between MySQL, PostgreSQL, MS SQL Server, SQLite and Oracle — CREATE TABLE, ALTER TABLE, indexes, sequences, views and data, with types, quoting, functions and LIMIT rewritten for the target engine. Also turn INSERT statements into JSON, CSV, YAML or XML and back. Everything runs in your browser.

MySQL `id` INT UNSIGNED PostgreSQL "id" INTEGER AUTO_INCREMENT SERIAL / IDENTITY INSERT ... VALUES ↔ JSON / CSV / YAML / XML ENUM → CHECK KEY → CREATE INDEX

Every Engine Thinks INT And AUTO_INCREMENT Mean Something Different

Moving a schema from MySQL to PostgreSQL or SQL Server is not copy-paste: backticks become double quotes or brackets, AUTO_INCREMENT becomes SERIAL or IDENTITY, ENUM needs a CHECK constraint, inline KEY clauses must become separate CREATE INDEX statements, and UNSIGNED quietly does not exist. This converter rewrites the DDL for the target engine and lists every spot that needs a human decision instead of failing silently.

The data converter handles the rows too: parse INSERT statements into JSON, CSV, YAML or XML, or rebuild INSERTs from any of those formats. All of it is plain JavaScript in your browser — your schema and your data never leave the machine.

How It Works

1. Paste SQL

CREATE TABLE statements — the source dialect is auto-detected from the quoting style and type names.

2. Pick a Target

MySQL, PostgreSQL, MS SQL Server, SQLite or Oracle — types, quoting, keys and defaults are mapped engine by engine.

3. Read the Warnings

UNSIGNED, ON UPDATE CURRENT_TIMESTAMP, triggers and engine-specific syntax are flagged, never silently dropped.

4. Convert Data Too

INSERT rows go to JSON, CSV, YAML or XML — and any of those come back as valid INSERT statements.

SQL Converter

Input DDL

Input data

Cross-dialect type matrix

The exact mapping this converter uses when rewriting your DDL.

CanonicalMySQLPostgreSQLMS SQL ServerSQLiteOracle

Everything above runs in JavaScript in your browser. Your schema, table data and connection details are never uploaded — SQL often describes and contains your production data, and it stays on your machine.

Dialect Reference — What Actually Differs

FeatureMySQLPostgreSQLMS SQL ServerSQLiteOracle
Identifier quotes`col`"col"[col]"col""COL"
Auto-incrementAUTO_INCREMENTSERIAL / GENERATED AS IDENTITYIDENTITY(1,1)INTEGER PRIMARY KEY AUTOINCREMENTGENERATED AS IDENTITY
True booleansTINYINT(1)BOOLEANBITINTEGERNUMBER(1)
Unicode stringsVARCHAR + utf8mb4VARCHAR / TEXTNVARCHARTEXTNVARCHAR2
Big textLONGTEXTTEXTNVARCHAR(MAX)TEXTCLOB
Binary dataBLOBBYTEAVARBINARY(MAX)BLOBBLOB
UUID valueBINARY(16) / VARCHAR(36)UUIDUNIQUEIDENTIFIERTEXTRAW(16)
Timestamp w/ zoneTIMESTAMP (UTC magic)TIMESTAMPTZDATETIMEOFFSETTEXTTIMESTAMP WITH TIME ZONE
Inline index in tableKEY idx (col)not allowednot allowednot allowednot allowed
UpsertON DUPLICATE KEY UPDATEON CONFLICT DOMERGEON CONFLICT DOMERGE
String concatCONCAT()||+ / CONCAT()||||

The converter maps the types automatically — the table above explains why the output looks different from your input.

SQL Converter — FAQ

How does the dialect auto-detection work?

The converter looks at the fingerprint of the input: backtick-quoted identifiers plus AUTO_INCREMENT or an ENGINE clause means MySQL; square brackets plus IDENTITY means SQL Server; SERIAL, ::casts or double-quoted identifiers point to PostgreSQL; VARCHAR2 or NUMBER(p,s) means Oracle; anything with plain unquoted names and no fingerprint defaults to generic SQL treated as SQLite. You can always override the choice with the Source dialect selector.

Which SQL statements are supported?

CREATE TABLE converts fully — types, quoting, keys, constraints, defaults. ALTER TABLE actions (add, drop, rename, retype), CREATE INDEX, CREATE SEQUENCE, INSERT, UPDATE, DELETE, simple SELECT, TRUNCATE, DROP and CREATE VIEW are converted with re-quoting, type mapping, function-name mapping (NOW, GETDATE, SYSDATE, IFNULL, NVL, ISNULL, COALESCE) and LIMIT rewriting. Stored procedures, functions and triggers are kept as clearly-marked TODO comments for a manual port — nothing is silently dropped.

What happens to AUTO_INCREMENT?

Each target gets the idiomatic form: PostgreSQL gets SERIAL (or GENERATED ALWAYS AS IDENTITY for modern syntax), SQL Server gets IDENTITY(1,1) on an INT or BIGINT, SQLite keeps INTEGER PRIMARY KEY AUTOINCREMENT, Oracle gets GENERATED BY DEFAULT AS IDENTITY, and MySQL keeps AUTO_INCREMENT plus the AUTO_INCREMENT= table option where present.

What about UNSIGNED columns?

PostgreSQL, SQL Server and Oracle have no unsigned integer types. The converter widens the type one step (INT UNSIGNED becomes BIGINT) and adds a CHECK (col >= 0) constraint so the range stays protected — and it tells you in the warnings so the choice is never silent.

How are ENUM and SET converted?

PostgreSQL, SQL Server, SQLite and Oracle have no ENUM column type. The converter emits the smallest fitting VARCHAR plus a CHECK (col IN (...)) constraint that preserves the exact allowed values, so invalid inserts keep failing exactly like they did on MySQL.

Can it convert the data rows as well as the schema?

Yes — the Data Converter tab parses multi-row INSERT statements and exports them as JSON, CSV, YAML or XML, and it accepts any of those formats back to produce INSERT statements for the target dialect, with correct identifier quoting and proper NULL and boolean handling per engine.

Is my schema or data uploaded anywhere?

No. Parsing and conversion are plain JavaScript in your browser. Nothing is sent to any server — a schema dump with INSERT rows can contain customer data, so the tool is built to keep it on your machine.

Why did my ON UPDATE CURRENT_TIMESTAMP disappear?

That MySQL shorthand has no direct equivalent in most engines — SQL Server and Oracle need a trigger, PostgreSQL needs a trigger or a DEFAULT now() plus application logic. The converter drops the clause and emits a warning with the recommended replacement instead of writing something that would fail at migration time.

Related Free Developer Tools

24/7 Support Available:

Our support team is here to assist you around the clock. Get Expert Help, Anytime.