SQLFormatter
FormatterConvertPricingDocsGet Pro
SQL Converter · MySQLPostgreSQL

Convert MySQL SQL to PostgreSQL

MySQL to PostgreSQL replaces `backtick` quoting with "double quotes", IFNULL with COALESCE and GROUP_CONCAT with STRING_AGG. A mechanical formatter only re-indents — it won’t rewrite dialect-specific syntax. The AI converter in the app translates the query and the table below shows exactly what changes.

MySQL — source
MySQL
SELECT u.id,
       IFNULL(u.nickname, u.email) AS handle,
       GROUP_CONCAT(t.tag) AS tags
FROM users u
JOIN tags t ON t.user_id = u.id
GROUP BY u.id;
PostgreSQL — converted
PostgreSQL
SELECT u.id,
       COALESCE(u.nickname, u.email) AS handle,
       STRING_AGG(t.tag, ',') AS tags
FROM users u
JOIN tags t ON t.user_id = u.id
GROUP BY u.id;
Convert your own query

What changes from MySQL to PostgreSQL

MySQLPostgreSQLWhy
`identifier`identifier / "identifier"Backticks are MySQL-only; Postgres uses double quotes (or none).
IFNULL(x, y)COALESCE(x, y)IFNULL is MySQL-specific.
GROUP_CONCAT(t.tag)STRING_AGG(t.tag, ',')Postgres spells string aggregation STRING_AGG with an explicit separator.

Other SQL conversions

OraclePostgreSQLT-SQLPostgreSQLMySQLT-SQLMySQLSnowflakeRedshiftPostgreSQLMySQLBigQueryMySQLSQLiteAll conversions →