Query Studio

Translate, format, validate and understand SQL & NoSQL across 26 database dialects. Free, no login, nothing stored.

Start Translating← All Tools

Convert a query from one database dialect to another.

From
Version
To
Version
MySQL input
221/20,000
PostgreSQL
🔀 Results appear here. Press Run or Ctrl+Enter.
Runs on GlitchBong servers · no login · queries aren't stored.

Everything in one studio

Query Studio is growing into a full database platform. Here's what's live today and what's next.

Live

Natural Language → SQL

Describe what you want in plain English and get a ready-to-run query in your dialect (AI).

Live

Universal Translator

Convert queries between 26 SQL & NoSQL dialects — identifiers, row limiting, null handling and more.

Live

Explain Query

See a SELECT walked through its true logical execution order, clause by clause.

Live

Visual Execution

Animate rows flowing through JOIN, WHERE, GROUP BY, ORDER BY and LIMIT.

Live

Performance Analyzer

A 0–100 score with severity-ranked warnings for SELECT *, cartesian joins, non-sargable filters and more.

Live

Query Optimizer

Concrete rewrite suggestions and index candidates — plus a full AI rewrite when AI mode is on.

Live

Formatter

Beautify or compress SQL with dialect-aware keyword casing and indentation.

Live

Validator

Real AST parsing plus best-practice checks for risky and non-portable patterns.

Live

Schema Diagrams

Turn CREATE TABLE statements into an ER diagram with foreign-key connectors.

26 supported databases

From the big relational engines to cloud warehouses and NoSQL query languages.

SQL

MySQLPostgreSQLSQLiteMariaDBOracleSQL ServerIBM DB2SnowflakeAmazon RedshiftGoogle BigQueryClickHouseDuckDBSpark SQLHiveTrinoPrestoTeradata

NoSQL / Other

MongoDB Aggregation · AICassandra CQL · AINeo4j Cypher · AIRedis · AIElasticsearch DSL · AIOpenSearch · AIGraphQL · AIPromQL · AIInfluxQL · AI

Popular query conversions

The translations developers reach for most. Pick a pair in the translator above to try any of them.

Frequently asked questions

How do I convert a MySQL query to PostgreSQL?

Pick MySQL as the “From” dialect and PostgreSQL as the “To” dialect, paste your query, and press Translate. Query Studio rewrites the syntax that differs between the two — such as backtick identifiers, IFNULL and LIMIT — and reformats the result in PostgreSQL style.

How do I convert a PostgreSQL query to MySQL?

Set PostgreSQL as “From” and MySQL as “To”, then Translate. Double-quoted identifiers become backticks, ANSI functions map to their MySQL equivalents, and standard FETCH/OFFSET row limiting becomes LIMIT. Use the Swap button to reverse the direction instantly.

Is Query Studio free to use?

Yes. Every tool here is completely free, needs no account, and has no usage limits. Translate, Explain, Visualize, Analyze, Optimize, Format, Validate and Diagram all run for free using deterministic engines — nothing is paywalled.

Which databases and query languages are supported?

Query Studio supports 26 dialects, including MySQL, PostgreSQL, SQLite, MariaDB, Oracle, SQL Server, IBM DB2, Snowflake, Amazon Redshift, Google BigQuery, ClickHouse, DuckDB, Spark SQL, Hive, Trino and Presto, plus NoSQL languages like MongoDB, Cassandra CQL, Neo4j Cypher, Redis and Elasticsearch DSL when the AI engine is enabled.

Can I pick a specific database version?

Yes. Each dialect has a version selector next to it (for example PostgreSQL 17 or MySQL 8.4) and defaults to the latest. Version matters because syntax and functions differ between releases; the AI engine uses your selection for version-accurate output.

What is SQL logical execution order?

SQL is written SELECT-first, but the database executes it FROM-first: FROM/JOIN, then WHERE, then GROUP BY, HAVING, SELECT, window functions, ORDER BY, and finally LIMIT. The Explain and Visualize tools walk your query through this real order so you understand why, for example, you can't reference a SELECT alias in WHERE.

How does the Performance Analyzer score my query?

It statically scans for well-known anti-patterns — SELECT *, UPDATE/DELETE without WHERE, cartesian joins, leading-wildcard LIKE, functions on filtered columns, unbounded ORDER BY and more — and subtracts points by severity to produce a 0–100 score and letter grade with an explanation for each finding.

Does the Optimizer actually rewrite my query?

The free engine gives concrete rewrite suggestions (turning IN (SELECT …) into a JOIN/EXISTS, collapsing OR into IN, removing needless DISTINCT) plus CREATE INDEX candidates derived from your WHERE and JOIN columns. With AI mode enabled it also returns a fully rewritten query tailored to your dialect.

How do I generate an ER diagram from my schema?

Open the Diagram tab, paste one or more CREATE TABLE statements, and press Diagram. Query Studio parses your tables, primary keys and foreign keys and draws an entity-relationship diagram with connectors between related columns.

What is a non-sargable query?

A predicate is non-sargable when the database can't use an index to satisfy it — most often because a column is wrapped in a function (WHERE YEAR(created_at) = 2024) or a LIKE pattern starts with a wildcard. The Analyzer flags these because they force full scans.

What's the difference between WHERE and HAVING?

WHERE filters individual rows before grouping and can't see aggregates; HAVING filters whole groups after GROUP BY and can test aggregates like COUNT(*) > 3. Run Explain on a grouped query to see exactly where each runs.

How do I convert LIMIT to TOP or FETCH FIRST?

Translate a query into SQL Server and LIMIT n becomes TOP n inside the SELECT; translate into Oracle or DB2 and it becomes FETCH FIRST n ROWS ONLY. Query Studio handles the direction both ways automatically.

Can Query Studio convert NoSQL like MongoDB or Cypher?

SQL-to-SQL translation is deterministic and always available. Converting to or from NoSQL query languages (MongoDB aggregation, Neo4j Cypher, Cassandra CQL, Elasticsearch DSL and others) uses the AI engine, which the site owner can enable with a free API key.

Do I need to install anything?

No. Query Studio is 100% web-based and works in any modern browser on desktop or mobile. There's nothing to download, no extension, and no account.

Is it safe to paste production queries?

Queries are sent to the server only to compute your result and are never stored, logged against you, or shared. That said, avoid pasting real secrets or credentials into any online tool as a general precaution.

Can I generate SQL from plain English?

Yes — the Generate tab turns a natural-language request ("top 10 customers by total spend this year") into a ready-to-run query in your chosen dialect. It's AI-powered, so it needs the site's AI engine to be enabled.

Can I chain the tools together?

Yes. After any result, a “Use this result →” bar lets you send the output straight into another tool — for example, translate a query, then Explain, Analyze or Optimize the translated version in one click without copy-pasting.

Are my queries stored or sent anywhere?

No. Queries are processed statelessly to return your result and are never saved, logged against your identity, or shared. There's no sign-in and nothing to opt out of.

Browse all tools →