# Format the SQL

Source: https://userguide.qualytics.io/explore/how-tos/queries/format-the-sql/

Format lays out the SQL in the editor with consistent line breaks and indentation. It follows the datastore's own dialect in Source SQL, and Spark SQL in Spark SQL mode.

> **Info: Related**
>
> - Concept: [Query Editor](https://userguide.qualytics.io/explore/deep-dive/query-editor/) for the editor's other actions and shortcuts.
> - [Switch the SQL Mode](https://userguide.qualytics.io/explore/how-tos/queries/switch-the-sql-mode/) to change the dialect Format follows.

**Step 1:** Open the workspace from the **Workspaces** panel.

**Step 2:** Click **Format**  under the editor, at its right, or press `Shift`+`Option`+`F``Shift`+`Alt`+`F`. On a narrow editor card, the button shows its icon only.

The SQL is rewritten in place.

*Last updated: November 23, 2026.*
