How to Enable Dark Theme in SQL Server Management Studio

This post shows the steps to enable dark theme in SQL server management studio. While i don’t work much on SQL servers, my usual day involves working more on Configuration Manager. But you know what at times I need to run queries and get results from site database. The cool thing about SQL server management studio is you can connect to the SQL server without logging in to machine where SQL is installed. In one of my posts we also saw the steps to deploy SSMS using SCCM.

If you are a person who works a lot on SQL, then I have got some cool trick for you guys. Probably you would know that SSMS 2016 and SSMS 17 supports only Blue and Light themes. So if you are tired of seeing light background and would want to try out the SSMS dark theme, this post is for you. This trick will add another color option called dark mode to the list.

The dark color theme is not officially supported in SSMS because it doesn’t apply dark theme throughout the tool. I mean to say that after enabling dark theme, you will still notice white background in the Object Explorer, Output panes Results grid, etc. That could be the reason why it’s disabled by default.

Enable Dark Theme in SQL Server Management Studio

We will now see the steps to enable dark theme in SQL server management studio (SSMS). I have got the SSMS 17.8.1 installed on my laptop. When i connect to SQL server this is how my query window with light theme looks. Not bad though, but let’s see how does it look when dark theme is enabled.

Enable Dark Theme in SQL Server Management Studio

Notice that under Tools > Options > General, the only two color themes available are Blue and Light.

Enable Dark Theme in SQL Server Management Studio

First of all close the SSMS before you do the changes. On the machine where SSMS is installed, browse to the following location to change the configuration file ssms.pkgundef. The file path for SSMS 17 is C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio. In case you are using SSMS 2016, the path is C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio. 

Enable Dark Theme in SQL Server Management Studio

Right click ssms.pkgundef and edit with Notepad++. Look for the line // Remove Dark Theme. This is usually on the line number 241. Add // to the beginning of very next line (see line 242 in the screenshot) and save the file.

Note – You must run Notepad++ app as administrator and open the file. Else you will not be able to save the changes to the file that you did.

Enable Dark Theme in SQL Server Management Studio

Open the SSMS again and under General > Options you will find a new color theme “Dark”. Select the Dark color theme and click OK.

Enable Dark Theme in SQL Server Management Studio

Open SQL server management studio, you will notice the SSMS dark theme has been applied.Enable Dark Theme in SQL Server Management Studio

25 Comments

  1. Avatar photo Daniel Liedke says:

    Thanks for the article!

    For SQL Server Management Studio 19:

    1) Open Notepad++ as Administrator

    2) Open file C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\ssms.pkgundef

    3) Comment last line:
    // Remove Dark theme
    //[$RootKey$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]

    4) Save it, reopen SSMS 19 and change the theme to Dark in Tools -> Options menu. Unfortunately the object explorer is not fully in dark mode.

  2. Avatar photo Lisa Casarona says:

    I just upgraded to 18.9.1. The // is still in my file yet Dark is not an option in my list like it was before.
    How do I get Dark mode back on 18.9.1?

    1. Avatar photo Lisa Casarona says:

      I found it. They moved that file to here: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE

  3. Thanks you, Greetings from Mexico

  4. Amazing, how do I change the Object Explorer to black as well?

  5. Thanks this worked like a Charm!!!!

  6. Avatar photo Ashish Kumar says:

    file location was –> C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE

  7. Avatar photo Manuel Rivera says:

    Thanks a lot collega!!!!. I needed it couse of my eyes.. Thank you very much!!

  8. Avatar photo Wayne D Craig says:

    Great! just what I was looking for – Thanks!

  9. For SSMS V18 the path is C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE

  10. Avatar photo Mncedi Ndovela says:

    Thanks Man, working fine!! SSMS v18 it is located some where else but people must just follow the file location of its shortcut

  11. Thanks, just the explorer is still white 😀

  12. Avatar photo Christian Bo Volder says:

    Just What I were looking for:):)

  13. Avatar photo Christian Bo Volder says:

    just what I were looking for:):):)

  14. Thanks! For SSMS 18 the .pkgundef is located at “C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef”

  15. Excellent, thank you. I don’t understand why MS don’t offer this by default. After all, it has been in VS for a long time and the two are often used together.

  16. Hi Prajwal,

    Thank you for the information. I am able to change the theme successfully. However, Object Explorer window, Job History window… is still in the ‘Light’ theme.

    I would be grateful if you have update for me.

    Thanks,
    Arjun

  17. Avatar photo Francisco Valdivieso says:

    thank U dude!!

Leave a Reply

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