How to resize a window to the exact size in pixels

In some cases, you may need to resize an app window to the exact size. For example, it can be useful when taking screenshots. Adjusting the size of the window by eye is almost impossible, unless you specifically trained for this.  Using the on-screen ruler is not very convenient. But you can greatly simplify this task.

So, you can use the popular AutoHotKey tool. AutoHotKey is more known as a key remapping utility. But you can use it for a wide range of other tasks, including resizing a window.

Resize a window to the exact size

  1. Download and install AutoHotkey from the official website
  2. Then right-click on the desktop and select New -> AutoHotKey Script.
  3. Open the created AHK script with Notepad or any other text editor.
  4. Type the following code into it, or download the ready-made script from this link.AutoHotkey script code
  5. Run the script by double clicking. Nothing will happen, but that’s normal. The script is now running in the background and is waiting for your input.
  6. To set an exact size for a window, switch to it, i.e. make it active. Now press ⊞ Win + = . Specify the width in pixels and click OK, then do the same for height.Set Specific Window Size
  7. The active window will immediately become of the size you need.Resize a window to exact size in pixels

AutoHotKey is not the only tool that one can use to accurately resize windows. A special ‘Sizer’ utility exists for this purpose for several years.

Set specific window size in pixels with the Sizer app

You can download Sizer from its website at this link:

The app is portable. All you need to do is to unpack it to any folder of your choice and run it.

It will place its icon into the system tray. You can open its menu by clicking that tray icon, or by pressing Ctrl + ⊞ Win + Z .

The Sizer app

It opens a menu for window sizes in pixels – 640×480, 800×600, 1024×768, and plenty of others commonly used templates.

window size template in Sizer

If you need a different window size, go to Sizer settings, click “Add” and add as many templates as you need.

Additionally, it allows assigning hotkeys to individual window sizes. This allows sizing a window directly without opening the app’s menu.

Also pay attention to the “Move to” setting, it allows you to choose the location of the window after resizing it.


Both AutoHotKey and Sizer tools have their pros and cons.

Using the AutoHotKey script may not seem very convenient, since you have to enter values manually. But it still allows you to resize windows of any apps.

Sizer is more convenient, but you may need to add templates in advance.

Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!

Author: The MFTNEXT Team

The MSFTNEXT project is a small team of authors who love to engage with the latest technology and gadgets. Being passionate Windows bloggers, we are happy to help others fix their system issues.

Leave a Reply

Your email address will not be published.