How to Enable Dark Theme Sql Server Management Studio – SSMS Dark Theme

Enabling Dark theme in SSMS

Dark theme is not enable by default in Sql Server Management Studio (SSMS) as it is not completely functional in SSMS.

For checking it go to Tools > Options > Environment > General.

As you can see there is no “Dark” option in our Color Theme.

For implementing Dark theme in your SSMS just follow one of the following methods and you will have it ready to work in a few minutes.

Method 1. Using text editor

Step 1: Open Text editor

For enabling dark theme on SSMS, open notepad++ or other text editor as an Administrator.

Step 2: Open ssms.pkgundef file

Proceed to open “ssms.pkgundef” file on Notepad ++, We need to modify this file in order to enable Dark theme for SSMS. This file can be found in the following path (If you didn’t change the default path).

  • SSMS 17.9 and below “C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\”
  • SSMS 18.x.x (GA)  C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\

Step 3: Comment line with text editor

After opening the file search the following text


This text can be found in the following lines.

  • SSMS 17.9 and below Line 242
  • SSMS 18.x.x (GA)  Line 460

Or if don’t find it in the quoted line  just search for “Remove Dark theme” in your current text editor.

For enabling dark mode all you have to do is to comment this line: “[$RootKey$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]”  by adding  “//”  at the beginning.


Step 4: Enable Dark Mode in SSMS

After that save and close the text editor. Then open Sql Server Management Studio and go to Tools > Options.

In Case your SSMS is open proceed to close/open it.

At Options go to Environment > General then select Color Theme and select “Dark” click on “Ok” and theme will change to dark.

Now, you have dark theme option enabled in Color theme , pick it and it will be applied.

Method 2. Using Power Shell

You can enable Dark theme in SSMS  by executing a command on Power Shell

Step 1: Open Windows Power Shell as Administrator

Open Windows Power Shell as an Administrator and execute the following command

Step 2: Execute the following command.

  • SSMS 17.9 and below, ssms.pkgundef file path: “C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\”

Command for SSMS 17.9 and below:

powershell -Command “(gc ‘C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef’) -replace ‘\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]’, ‘//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]’ | Out-File ‘C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef'”

  • SSMS 18.x.x (GA), ssms.pkgundef file path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\

Command for SSMS 18.x.x:

powershell -Command “(gc ‘C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef’) -replace ‘\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]’, ‘//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]’ | Out-File ‘C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef'”

In case this command does not work change “ssms.pkgundef’” file path.

After Executing this powershell commands there is no confirmation message from PowerShel.

Changes are going to be applied after executing the powershell command and you are going to be able to use dark mode on SSMS,

If you receive a message back from PowerShell, that means that It was not possible to find ssms.pkgundef file in the given path and you will have to locate ssms.pkgundef path.

Step 3: Enable Dark Mode in SSMS

As in the previews method,  proceed to open SSMS go to Tools > Options > Environment > General and select “Dark”

Cons of using Dark Mode theme on SSMS

Dark mode seems to be incomplete on actual versions.

When applying dark theme on SSMS, something that I didn’t like is that Dark theme is not apply in all parts of SSMS, Some parts are white (ex.Object Explorer) and other parts at menu are black with a black background, which really makes hard to read.

I checked Microsoft Forums and people says that this version is on beta and Microsoft developers are going to include “Dark Theme” as an official theme on next versions. Other people say that this version is not going to be included because Microsoft developers says that it will take a lot of effort and rework of certain SSMS parts.

I looked into and i found that they don’t plan to invest effort on Dark Theme yet.

Method 3. Changing Fonts and Colors in SSMS

We can manually change “Fonts and Colors” in SSMS text editor and make the background dark and the fonts light which causes the contrast that we have on a Dark Theme.

For doing that go to Tools > Options > Environment > Fonts and Colors.

Step 1. Changing Item foreground and Background

As a first step, Proceed to change item foreground for “White” and item background for “Black”, you can see how this is going to see in the Sample window.

If you want a better looking background/foreground combination on “Plain text” make the following changes

  • Item foreground: RGB(228,228,228)
  • Item background: RGB(50,50,50)

Step 2. Proceed to change other items

Some common configurations for different Display items are:

  • Comment: RGB(255,175,45)
  • Keyword: RGB(127,176,228)
  • Script string: Yellow RGB(255,255,0)
  • SQL Operator: RGB(199,199,199)
  • SQL Stored Procedure: RGB(128,255,128)
  • SQL String: Yellow RGB(255,255,0)
  • SQL System Function: RGB(220,120,255)
  • SQL System Table: RGB(128,255,128)

You can make changes on this settings, depending on your preferences.

For example when changing Keyword proceed as follows.

On “Item foreground” proceed to click on Custom.

For keyword change we have to apply RGB(127,176,228) (RGB means Red,Green and Blue) in the given order.

You can see results on the “Sample” window.

After applying all changes, results are going to look like this.

Method 4. Contrast mode in Windows 10

This method for enabling Dark theme consist in apply a Windows 10 configuration, Please proceed with the next steps

Step 1: Open High Contrast settings

Select the Start button and search for “High contrast settings”

Step 2: Turn on high contrast

On high contrast menu turn on high contrast and on “Choose a theme” select “High Contrast Black”

High contrast mode will be applied by default and it is going to look as follows.

When applying this change you are going to loose text highlighting and High Contrast mode is going to be applied in your SSMS.

5. Alternatives to Dark Mode in SSMS

There are other Microsoft options that have dark theme already include.

Alternative 1: Visual studio Code

Visual Studio code is a popular tool that allows you to write code in different languages, with it’s extensive number of plugins  that helps you customizing this amazing code editor, It is a good alternative for working on a complete Dark theme environment, you can download it in the following link: Visual Studio Code Download.

Alternative 2: Azure Data studio

An SSMS option that focus on analyzing data, this tool helps you to explore the Database Engine by providing you a great number of plugins and internal tools that makes you easier to do certain SQL server task.  Azure Data Studio comes with Dark mode included. you can download it in the following link: Azure Data Studio Download.

Between those two I prefer using Azure Data Studio as this tool and it’s plugins are develop for managing data.

There are other alternatives which include better tools for helping you with your SQL task, but I recommend using these ones as they are free and they were develop by Microsoft team.

6. Conclusions

As you can see you can apply dark theme on Sql Server by doing simple changes, if you don’t really like Dark theme you can proceed to use the other options exposed in the article.

Tell me which option do you prefer, to live and use incomplete Dark mode or the other options available ?.


Leave a Reply

Your email address will not be published. Required fields are marked *