Last updated: Apr 6, 2024
Reading time·4 min
Use the following keyboard shortcuts to zoom in and out in VS Code:
Ctrl
+ =
( or Cmd
+ =
on macOS) to zoom in.Ctrl
+ -
( or Cmd
+ -
on macOS) to zoom out.Ctrl
+ Numpad0
(or Cmd
+ Numpad0
on macOS) to reset the zoom level to
0
.You can also view the keyboard shortcuts for your operating system in this table in the docs.
The commands are called:
You can also use the Command Palette.
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.Using the Editor Font Zoom Reset command via the Command Palette is quite convenient if your keyboard doesn't have a Numpad.
If you need to change the keyboard shortcuts for zooming in and out:
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.Enter
to confirm.You can also single-clock on a row and then click on the pencil icon.
For example, if your keyboard shortcut doesn't have a Numpad, you can set the
View: Reset Zoom command to Ctrl
+ 0
(or Cmd
+ 0
on macOS).
Here is a short clip of using the new keyboard shortcut.
When you use the keyboard shortcuts, you increase/decrease the editor and the font.
If you only want to increase/decrease the font when zooming in and out, you have to enable the Mouse Wheel Zoom setting.
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.You can also open the settings screen by pressing Ctrl
+ ,
on Windows and
Linux or Cmd
+ ,
on macOS.
The Mouse Wheel Zoom setting allows us to zoom the font of the editor using the
mouse wheel and holding Ctrl
(or Cmd
on macOS).
Hold Ctrl
and use the mouse wheel to zoom in and out.
Notice that using mouse wheel zoom affects only the font of the editor.
You can also enable mouse wheel zoom directly in your settings.json file.
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.Type user settings json.
Click on Preferences: Open User Settings (JSON)
settings.json
file."editor.mouseWheelZoom": true,
You can also use the top menu to zoom in and out.
Click on View in the top menu, then hover over Appearance and select one of Zoom in, Zoom Out and Reset Zoom.
Note: you might have to press Alt
to show the top menu on Windows and
Linux.
You can learn more about the related topics by checking out the following tutorials: