<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-format-your-queries-in-ssms-h7ir7pxcg" -->

---
title: How to Format Your Queries in SSMS | daily.dev
description: SQL Server Management Studio 22.7 introduced a built-in T-SQL query formatter accessible via right-click or the Ctrl+K, Ctrl+Q shortcut. The formatter is...
canonical: https://daily.dev/posts/how-to-format-your-queries-in-ssms-h7ir7pxcg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Format Your Queries in SSMS | daily.dev
og:description: SQL Server Management Studio 22.7 introduced a built-in T-SQL query formatter accessible via right-click or the Ctrl+K, Ctrl+Q shortcut. The formatter is...
og:url: https://daily.dev/posts/how-to-format-your-queries-in-ssms-h7ir7pxcg
og:image: https://api.daily.dev/og/posts/h7iR7pxcg.png
og:image:alt: How to Format Your Queries in SSMS
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Format Your Queries in SSMS

**[Brent Ozar](https://daily.dev/sources/brentozar)** · 2 min read · 0 upvotes · 0 comments

## Summary

SQL Server Management Studio 22.7 introduced a built-in T-SQL query formatter accessible via right-click or the Ctrl+K, Ctrl+Q shortcut. The formatter is highly configurable through Tools > Options > SQL Formatter, with extensive control over newline placement and other style preferences. Settings can be exported as JSON to share with teammates. Users can update to the latest SSMS via Help > Check for Updates.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.brentozar.com/archive/2026/06/how-to-format-your-queries-in-ssms>

---

Tags: [#microsoft-sql-server](https://daily.dev/tags/microsoft-sql-server)

[View this post on daily.dev](https://daily.dev/posts/how-to-format-your-queries-in-ssms-h7ir7pxcg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Format Your Queries in SSMS","url":"https://daily.dev/posts/how-to-format-your-queries-in-ssms-h7ir7pxcg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-format-your-queries-in-ssms-h7ir7pxcg"},"datePublished":"2026-06-30T13:20:11.656Z","dateModified":"2026-06-30T13:20:44.641Z","description":"SQL Server Management Studio 22.7 introduced a built-in T-SQL query formatter accessible via right-click or the Ctrl+K, Ctrl+Q shortcut. The formatter is...","image":"https://i0.wp.com/www.brentozar.com/wp-content/uploads/2026/06/formatting-options-1.jpg?resize=600%2C722&ssl=1","thumbnailUrl":"https://i0.wp.com/www.brentozar.com/wp-content/uploads/2026/06/formatting-options-1.jpg?resize=600%2C722&ssl=1","isAccessibleForFree":true,"articleSection":"Brent Ozar","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Brent Ozar","logo":"https://media.daily.dev/image/upload/s--uHhajUhc--/c_limit,w_256/f_auto,q_auto/v1780213426/logos/brentozar?_a=BAMAMiWQ0","url":"https://daily.dev/sources/brentozar"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-format-your-queries-in-ssms-h7ir7pxcg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"microsoft-sql-server","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Brent Ozar","item":"https://daily.dev/sources/brentozar"},{"@type":"ListItem","position":3,"name":"How to Format Your Queries in SSMS"}]}
```

