Skip to content
← All Guides
๐Ÿ”’ Runs in your browser ๐Ÿšซ No data uploaded โœ“ Free, no login
HomeBlogSQL Formatter + Explainer Tutorial
Tutorial

How to Use the SQL Formatter + Explainer + Complexity Meter: Step-by-Step Tutorial

By Bill Crawford ยท March 2, 2026 ยท SQL  ยท  Last updated March 02, 2026

Table of Contents

  1. Step 1: Open the SQL Formatter + Explainer
  2. Step 2: Paste or Upload Your SQL
  3. Step 3: Select Your Dialect
  4. Step 4: Configure Advanced Options
  5. Step 5: Click Format + Explain
  6. Step 6: Review the Formatted SQL
  7. Step 7: Read the Plain English Explanation
  8. Step 8: Browse the Extracted Facts
  9. Step 9: Check the Complexity Score
  10. Step 10: Copy and Share Results
  11. Related Tools & Guides
  12. Related Articles

Step 1: Open the SQL Formatter + Explainer

Go to the SQL Formatter + Explainer + Complexity Meter page. You will see the input editor, dialect selector, action buttons, and the advanced options toggle.

Step 2: Paste or Upload Your SQL

The default mode is Paste SQL โ€” type or paste any SQL query directly into the editor. To load a file instead, click the "Upload / Drop" tab and either drag a .sql or .txt file into the drop zone or click to browse. Here is a sample query to try:

SELECT
  c.customer_name,
  COUNT(o.order_id) AS total_orders,
  SUM(o.amount) AS total_revenue
FROM customers c
INNER JOIN orders o ON c.customer_id = o.customer_id
LEFT JOIN refunds r ON o.order_id = r.order_id
WHERE o.status = 'paid'
  AND o.order_date >= '2024-01-01'
  AND r.refund_id IS NULL
GROUP BY c.customer_name
HAVING SUM(o.amount) > 1000
ORDER BY total_revenue DESC
LIMIT 10;

Step 3: Select Your Dialect

Use the Dialect dropdown to choose Generic, PostgreSQL, MySQL, SQL Server, or SQLite. This affects how the parser interprets your SQL and how the formatter handles dialect-specific syntax. If you're not sure, leave it on Generic.

Step 4: Configure Advanced Options

Click "Advanced Options" to expand the settings panel. You can toggle uppercase keywords on or off, choose between 2-space and 4-space indentation, and enable or disable blank lines between major clauses. These settings only affect the formatted output โ€” they don't change the explanation or complexity score.

Step 5: Click Format + Explain

Click the blue "โšก Format + Explain" button to run all three functions at once. The results panel appears below the editor with five tabs: Formatted SQL, Explanation, Extracted Facts, Complexity, and Errors (only if errors were detected).

You can also run individual functions: "โœจ Format" for formatting only, or "๐Ÿ’ก Explain" for the explanation and complexity score without reformatting.

Step 6: Review the Formatted SQL

The Formatted SQL tab shows the cleaned-up query with consistent indentation, keyword casing, and clause separation. A stats row at the bottom shows the line count and character count. Click "Copy" to copy the formatted SQL to your clipboard.

Step 7: Read the Plain English Explanation

Switch to the Explanation tab. The Summary section shows a one-or-two sentence description of what the query does. For the sample query, it explains that the query reads data from customers, joining 2 tables, applying 3 filter conditions, grouped by customer_name, returning the top 10 rows.

The Breakdown section lists every structural element as labeled entries: tables read from, joins with types, filter count, grouping fields, aggregates used, sort order, and row limit.

Step 8: Browse the Extracted Facts

The Extracted Facts tab shows a card grid with every piece of structural information the tool identified: statement type, tables, joins, filters, GROUP BY, aggregates, ORDER BY, limit, subqueries, CTEs, and window functions. This is the raw data behind the explanation โ€” useful for documentation or verifying that the parser found everything.

Step 9: Check the Complexity Score

Switch to the Complexity tab. The score is shown as a large number (0โ€“100) with a colored label: Simple, Moderate, Complex, or Very Complex. A colored bar provides a visual indicator. Below the bar, the breakdown lists every element that contributed to the score with its point value.

For the sample query, the score is around 55 (Complex) because it has 3 tables (15 points), 2 joins (20 points, capped at 20), GROUP BY (10 points), and 3 filters (6 points).

Step 10: Copy and Share Results

Use the Copy buttons on the Formatted SQL and Explanation tabs to copy results to your clipboard. You can paste the formatted query back into your editor or include the plain English explanation in documentation, code review comments, or team wikis.

Ready to try it with your own SQL?

Open SQL Formatter + Explainer

Further reading: MySQL โ€” EXPLAIN Output Format ยท SQLite โ€” EXPLAIN QUERY PLAN

BC
Bill Crawford
Founder, Data Conversion Center

Bill Crawford is a data systems developer and technical founder with over 30 years of professional experience in accounting, finance, and business operations.

He holds a Bachelor’s degree in Accounting and has spent more than three decades working within financial and operational environments. Over the past 10 years, he has been heavily involved in the development, implementation, and refinement of financial and enterprise data systems for both Fortune 500 companies and smaller organizations.

His work bridges finance and technology — combining deep domain knowledge in structured reporting and accounting workflows with hands-on SQL development and database architecture experience.

Bill founded DataConversionCenter.com to build practical, browser-based tools that simplify complex data challenges, including:

Rather than focusing on theoretical examples, his tools and articles are informed by real-world challenges encountered in enterprise reporting systems, financial databases, and operational data environments.

Professional Background
  • Bachelor’s Degree in Accounting
  • 30+ years in accounting and finance
  • 10+ years deeply involved in financial and enterprise systems development
  • Experience supporting Fortune 500 and small-to-mid-sized organizations
  • Hands-on SQL development across relational database platforms

Bill’s mission is to reduce friction in data workflows — particularly for professionals working with structured financial, operational, and reporting data.