SQL Dialect Converter

Convert SQL syntax between MySQL, PostgreSQL, and SQLite automatically. Handles LIMIT, AUTO_INCREMENT, quoting, date functions, and 40+ syntax differences.

Dialect Converter

MySQL PostgreSQL
Converted: 0 changes Input: 0 chars Output: 0 chars
Try an example:

MySQL → PostgreSQL

AUTO_INCREMENTSERIAL · Backtick ` → Double-quote " · LIMIT stays · CONCAT()|| · IFNULL()COALESCE() · DATE_FORMAT()TO_CHAR() · GROUP_CONCAT()STRING_AGG() · INSERT IGNOREINSERT ... ON CONFLICT DO NOTHING

PostgreSQL → MySQL

SERIALAUTO_INCREMENT · ::typeCAST() · ILIKELIKE · ||CONCAT() · COALESCE() stays · TO_CHAR()DATE_FORMAT() · STRING_AGG()GROUP_CONCAT() · NOW() stays

MySQL → SQLite

AUTO_INCREMENTAUTOINCREMENT · NOW()DATETIME('now') · LIMIT stays · IFNULL() stays · CONCAT()|| · Remove ENGINE= and CHARSET · GROUP_CONCAT() stays · INSERT IGNOREINSERT OR IGNORE

Frequently Asked Questions

Paste your MySQL SQL into the input box. Select "MySQL" as source and "PostgreSQL" as target. Click Convert. The tool automatically translates AUTO_INCREMENT to SERIAL, backtick quotes to double-quote identifiers, CONCAT() to the || operator, IFNULL() to COALESCE(), LIMIT stays the same, and MySQL-specific date functions to PostgreSQL equivalents like TO_CHAR().

The converter handles PostgreSQL to SQLite as well: SERIAL becomes INTEGER PRIMARY KEY AUTOINCREMENT, ILIKE becomes LIKE, ::type casts are simplified, || stays as is (SQLite supports it), RETURNING clauses are handled, and sequences (CREATE SEQUENCE) are converted to AUTOINCREMENT on the column definition.

The converter handles 40+ syntax differences across the three dialects, including CREATE TABLE definitions, SELECT queries, INSERT/UPDATE/DELETE, subqueries, CTEs, window functions, and JOINs. For edge cases or dialect-specific features (like MySQL's ON DUPLICATE KEY), the tool applies the closest equivalent. Always review the output before using it in production.

No size limit. All processing is client-side, so the practical limit depends on your browser's memory. For typical development queries (CREATE TABLE, INSERT, SELECT with CTEs), performance is instant. Very large scripts (500+ lines) may take a second or two to process.

Related Tools

SQL Formatter· Dialect Converter Guide· Data Generator Guide· SQL Validator