Convert SQL between MySQL, PostgreSQL, SQL Server, Oracle, SQLite, BigQuery, Redshift and Snowflake. Auto-detects the source dialect.
Paste a query written for one database and get it back rewritten for another. This SQL dialect translator handles the nine dialects teams actually move between — Standard SQL, MySQL, PostgreSQL, SQL Server (T-SQL), Oracle, SQLite, BigQuery, Redshift, and Snowflake — and it detects the source dialect for you, so in most cases the only thing you have to choose is where the query is going.
It is aimed at the specific, tedious part of a migration: the syntax that differs for no good reason. LIMIT versus TOP versus ROWNUM. Backticks versus double quotes versus square brackets. IFNULL versus ISNULL versus NVL versus COALESCE. None of that is hard, all of it is slow, and getting it wrong produces a syntax error at the worst possible moment. Everything runs client-side in your browser, so query text — which frequently contains table names, column names, and business logic you would rather not paste into someone else’s server — never leaves your machine.
LIMIT n, LIMIT offset, count, SELECT TOP n, OFFSET … FETCH NEXT, and Oracle’s ROWNUM predicate, converted in every direction.IFNULL, ISNULL, NVL, and COALESCE, plus the date, string, and conversion functions that carry different names in each dialect.:: shorthand expanded into CAST(… AS …) and back where the target supports it.SERIAL, AUTO_INCREMENT, IDENTITY, TEXT, NVARCHAR, JSONB, NUMBER, and the rest mapped to the closest equivalent.|| operator, MySQL’s CONCAT(), and T-SQL’s +.TRUE/FALSE where supported, 1/0 for SQL Server, Oracle, and SQLite, which have no native boolean type.Every substitution the translator makes is recorded as a warning with the original text, the converted text, and the line number, so the output is auditable rather than a black box. Warnings are also where the translator tells you what it could not do faithfully — a type with no exact equivalent, or a construct that changes semantics in the target.
The editor panes are resizable, which matters when you are working with a query long enough to need a migration tool in the first place.
Given this SQL Server query:
SELECT TOP 10 id, [user name], GETDATE() AS now FROM [user table] WHERE ISNULL(deleted, 0) = 0 AND active = 1
Four separate rules fire. SELECT TOP 10 becomes a trailing LIMIT 10. The square-bracketed identifiers [user name] and [user table] become double-quoted. GETDATE() becomes CURRENT_TIMESTAMP. ISNULL(deleted, 0) becomes COALESCE(deleted, 0). The active = 1 comparison is flagged rather than silently changed, because in PostgreSQL active may be a genuine boolean column, in which case the correct rewrite is active = TRUE — and the translator cannot know your schema.
| Dialect | First 10 rows | Rows 21–30 |
|---|---|---|
| MySQL / SQLite | LIMIT 10 | LIMIT 20, 10 or LIMIT 10 OFFSET 20 |
| PostgreSQL / Redshift | LIMIT 10 | LIMIT 10 OFFSET 20 |
| SQL Server | SELECT TOP 10 | OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY |
| Oracle 12c+ | FETCH FIRST 10 ROWS ONLY | OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY |
| BigQuery / Snowflake | LIMIT 10 | LIMIT 10 OFFSET 20 |
Note the trap in the SQL Server and Oracle offset forms: both require an ORDER BY clause. A LIMIT without ordering is legal in MySQL and PostgreSQL but returns an arbitrary ten rows; translated into T-SQL it becomes a syntax error. That is a case where the target dialect is doing you a favour.
Treat the output as a strong first draft, not a finished migration. Syntax translation is mechanical; semantics are not. Specifically:
DATETIME and PostgreSQL TIMESTAMP look equivalent but differ in range, precision, and time-zone handling. Oracle NUMBER maps to several PostgreSQL types depending on scale.'' as NULL; nothing else does. Queries that rely on that behaviour change meaning after translation, and no rewrite of the SQL text can fix it.ORDER BY results may not match row for row.Always run the translated query against a copy of the target database and compare results before trusting it. If you also need the output readable, run it through the SQL formatter afterwards.
It scores the query against fingerprints for each dialect — backtick or bracket quoting, TOP versus LIMIT, dialect-specific function names like NVL or GETDATE, the :: cast operator — and reports the best match with a confidence value. Short or fully ANSI-standard queries have nothing distinctive to detect, so set the source dialect manually in those cases.
No. Detection, translation, and highlighting all run in JavaScript in your browser. Nothing is transmitted, stored, or logged.
It works on query syntax, and it will process multiple statements, but it is not a schema migration tool. DDL is translated on a best-effort basis for common type names; constraints, indexes, partitioning, and stored procedures need manual review.
Because some rewrites depend on your schema. active = 1 in T-SQL may be a boolean or a genuine integer flag; converting it blindly would break one of those cases. The warnings panel exists so those judgement calls stay with you.
Translations into PostgreSQL and MySQL are the most heavily exercised, since those are the most common migration targets. All nine dialects are supported in both directions, but the further a construct is from ANSI SQL, the more likely you are to see a warning rather than a clean rewrite.
Yes, all three are first-class dialects. Their divergences are mostly in type names, quoting, and the cast operator, which are exactly the categories the translator covers — but their analytics-specific extensions (BigQuery STRUCT and ARRAY, Snowflake VARIANT) have no equivalent elsewhere and are flagged rather than converted.
The tool never executes anything — it does text transformation only. That said, translating a query does not make it safe: if the original concatenated user input into the SQL string, the translated version does too. Parameterise queries in your application code regardless of dialect.
Yes — unlimited use, no account, no rate limit. It sits alongside the SQL formatter and cron expression builder in our developer toolkit.
SQL conversion translates database queries and schema definitions between different SQL dialects. While SQL is a standardized language (ISO/IEC 9075), each database system implements its own extensions, data types, and syntax variations. A query that runs on PostgreSQL may fail on MySQL, SQL Server, or SQLite without modification.
This tool converts SQL between major database dialects, handling syntax differences, data type mappings, and function translations — essential for database migrations, multi-database applications, and cross-platform development.
| Feature | PostgreSQL | MySQL | SQL Server | SQLite |
|---|---|---|---|---|
| Auto-increment | SERIAL / GENERATED | AUTO_INCREMENT | IDENTITY | AUTOINCREMENT |
| String concat | || | CONCAT() | + or CONCAT() | || |
| Boolean type | BOOLEAN | TINYINT(1) | BIT | INTEGER |
| Current timestamp | NOW() / CURRENT_TIMESTAMP | NOW() | GETDATE() | datetime('now') |
| Limit results | LIMIT n | LIMIT n | TOP n / OFFSET FETCH | LIMIT n |
| String quoting | 'single' | 'single' or "double" | 'single' | 'single' |
| Identifier quoting | "double" | `backticks` | [brackets] | "double" or `backticks` |
| JSON support | jsonb (native) | JSON (native) | NVARCHAR + JSON functions | JSON functions (3.38+) |
| UPSERT | ON CONFLICT | ON DUPLICATE KEY UPDATE | MERGE | ON CONFLICT |