Query Studio

Translate, format, validate and understand SQL & NoSQL across 18 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/10,000
PostgreSQL
🔀 Results appear here. Press Run or Ctrl+Enter.
Runs on GlitchBong servers · no login · queries aren't stored.

Everything in one studio

Eight free tools for reading, converting and cleaning up your queries — every result computed instantly, no AI and no sign-up.

Universal Translator

Convert queries across 18 dialects — identifiers, row limiting, null handling, current-timestamp and OFFSET paging — plus SQL to MongoDB.

Explain Query

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

Visual Execution

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

Performance Analyzer

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

Query Optimizer

Concrete rewrite suggestions and CREATE INDEX candidates derived from your WHERE and JOIN columns.

Formatter

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

Validator

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

Schema Diagrams

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

18 supported databases

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

SQL

MySQLPostgreSQLSQLiteMariaDBSQL ServerIBM DB2SnowflakeAmazon RedshiftGoogle BigQueryDuckDBSpark SQLHiveTrinoPresto

NoSQL / Other

MongoDB Aggregation · translate targetElasticsearch DSL · format · validateOpenSearch · format · validateGraphQL · format · validate

Popular query conversions

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

MySQL to PostgreSQLPostgreSQL to MySQLSQL Server to PostgreSQLPostgreSQL to SQL ServerMySQL to SQL ServerSQL Server to MySQLMySQL to Google BigQueryPostgreSQL to SnowflakeGoogle BigQuery to SnowflakePostgreSQL to Amazon RedshiftIBM DB2 to PostgreSQLSQLite to PostgreSQLMySQL to MariaDBMySQL to MongoDBPostgreSQL to MongoDB

Frequently asked questions

How do I convert a MySQL query to PostgreSQL?

Select MySQL as the “From” dialect and PostgreSQL as the “To” dialect, paste your query, and press Translate. Query Studio rewrites the parts that differ between the two databases — backtick identifiers become double quotes, IFNULL becomes COALESCE, and MySQL’s LIMIT/OFFSET is kept in PostgreSQL form — then reformats the result. It’s free, instant, and nothing is stored.

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 OFFSET … FETCH row limiting becomes LIMIT. Press the Swap (⇄) button to flip the direction instantly and translate back.

Can I convert SQL Server (T-SQL) to PostgreSQL or MySQL?

Yes. Choose SQL Server as “From” and PostgreSQL or MySQL as “To”. Query Studio converts bracketed [identifiers], turns TOP n into LIMIT n, maps ISNULL and GETDATE() to COALESCE and the target’s current-timestamp function, and rewrites OFFSET/FETCH paging to the target’s style. The same works in reverse to move from Postgres/MySQL to SQL Server.

Can Query Studio convert SQL to MongoDB?

Yes, and with no AI. Pick a SQL dialect as “From”, MongoDB as “To”, paste a SELECT and Translate. Query Studio turns it into a MongoDB find() query or an aggregation pipeline — WHERE becomes a filter, JOIN becomes $lookup, GROUP BY becomes $group, and ORDER BY/LIMIT become $sort/$limit — computed deterministically so you get the same result every time.

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 IBM DB2 and it becomes FETCH FIRST n ROWS ONLY. Query Studio handles both directions automatically and rewrites any OFFSET into the correct pagination syntax for the target database.

Which databases and query languages are supported?

Query Studio supports 18 dialects. On the SQL side: MySQL, PostgreSQL, SQLite, MariaDB, SQL Server, IBM DB2, Snowflake, Amazon Redshift, Google BigQuery, DuckDB, Spark SQL, Hive, Trino and Presto. It also converts SQL to MongoDB, and formats and validates GraphQL, Elasticsearch and OpenSearch. Everything is free with no account.

Is Query Studio free, and do I need to sign up?

It’s completely free with no account and no usage limits. Translate, Explain, Visualize, Analyze, Optimize, Format, Validate and the ER Diagram tool all run for free — nothing is trial-limited or paywalled, and there’s nothing to install.

Are my queries stored or sent to a third party?

No. Your query is processed on the server only to return the result, then discarded — it is never saved, logged against you, or shared, and there is no sign-in. As good general practice, avoid pasting real credentials or secrets into any online tool.

Is Query Studio powered by AI?

No. Every result is computed deterministically by real SQL parsers and rule engines — so it’s instant, free, unlimited, and gives the same answer every time. Nothing is sent to an AI service, which also means no rate limits and no surprises in the output.

What is SQL’s logical execution order?

SQL is written SELECT-first, but a database executes it FROM-first: FROM and JOIN, then WHERE, then GROUP BY, HAVING, SELECT, window functions, ORDER BY, and finally LIMIT. The Explain and Visualize tabs walk your query through this real order — which is why, for example, you can’t use a SELECT alias inside WHERE.

What is the difference between WHERE and HAVING?

WHERE filters individual rows before grouping and cannot 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 clause runs in the execution order.

How does the Performance Analyzer score my query?

It statically scans for well-known anti-patterns — SELECT *, UPDATE or DELETE without WHERE, cartesian joins, leading-wildcard LIKE, functions applied to 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 every finding.

What does the Optimizer suggest, and what is a non-sargable query?

The Optimizer gives concrete rewrites — turning IN (SELECT …) into a JOIN or EXISTS, collapsing OR into IN, removing needless DISTINCT — plus CREATE INDEX candidates from your WHERE and JOIN columns. It also flags non-sargable predicates: filters the database can’t use an index for, usually because a column is wrapped in a function (WHERE YEAR(created_at) = 2024) or a LIKE pattern starts with a wildcard.

How do I generate an ER diagram from SQL?

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 — no login and nothing to install.

Can I format and validate GraphQL or Elasticsearch queries?

Yes. Pick GraphQL, Elasticsearch DSL or OpenSearch as the dialect and use the Format or Validate tab. GraphQL is parsed and pretty-printed with the official GraphQL parser; Elasticsearch and OpenSearch request bodies are validated and beautified as JSON.

Can I chain the tools together?

Yes. After any result, a “Use this result →” bar sends the output straight into another tool — translate a query, then Explain, Analyze or Optimize the translated version in one click, with no copy-pasting.

Browse all tools →