Processed in your browser

Switching language reloads this page. Copy or save any inputs and results first.

12 / DATA

SQL formatter

Readable queries with clear clauses and indentation.

Preview as you type
104 charsUTF-8 · Up to 200,000 characters
0 charsAuto-convert
Inputs and results are processed only in this browser and are not saved.
How to use, examples and questions

Format SQL clauses, line breaks and indentation. Choose a dialect matching your database, including MySQL / MariaDB, PostgreSQL, SQLite, Oracle PL/SQL and SQL Server.

SQL formatter — how to use

  1. Paste SQL and choose your database's dialect.
  2. Choose keyword case and indentation.
  3. Review and copy the formatted result. SQL is not executed and no database connection is made.

Input and output examples

Format a MySQL SELECT statement

Settings: MySQL / MariaDB / uppercase keywords / 2 spaces

Input
select id, title from articles where status = 'published';
Output
SELECT
  id,
  title
FROM
  articles
WHERE
  status = 'published';

Frequently asked questions

Does pasting SQL execute it?

No. It only formats text in your browser, without connecting to a database or changing data.

What should I do if formatting fails?

Choose the dialect matching your actual database. Also check unmatched quotes or brackets, template syntax and unsupported placeholders.

Does successful formatting mean the SQL is valid?

Formatting does not fully validate syntax or guarantee execution results. Check the SQL in the destination database too.

Specifications and limits

Formats SQL whitespace and line breaks for the selected dialect. Does not verify execution results or complete syntax validity. Some placeholders, stored procedures and template syntax may not format successfully.

Analytics and privacy

Conversion inputs and results are processed in your browser. Image URL and OGP loads connect directly to your chosen destination only when you select the corresponding button. Image, video, Markdown, HTML, CSV and TSV files are not uploaded to our servers. Self-signed certificates and signatures are generated locally; private keys are never sent to our servers or analytics. Markdown external images and HTML scripts are not loaded. The API client sends the URL, headers, body and selected files directly to the endpoint only when you select Send or its shortcut. Speed tests exchange generated test data with Cloudflare when you start a measurement. These destinations receive your IP address. We do not proxy these connections or send inputs or measurement results to analytics. Conversions are not saved automatically. Unsaved API inputs, responses, history and environments stay only in this page. Only API requests explicitly selected with Save in this browser are stored. Auth fields, secret variables, known auth headers and files are excluded; review URLs, bodies and custom headers for other secrets first. Collection exports include URLs and bodies, so review them before sharing.

When analytics is enabled, we use Google Analytics 4 to measure pages, tool names and use counts, actions such as copying or saving an image, speed test starts, completion, cancellation and errors, product link clicks, and monitoring guide and service clicks using fixed IDs. Google uses cookies and collects device and browser information. Google signals for advertising and ad personalization are disabled.

Disabling analytics stores only that preference in this browser. Analytics settings never contain your inputs.Google's privacy policy

Analytics is currently unavailable on this site.