
Last updated: Apr 6, 2024
Reading time·3 min

To transform text to uppercase or lowercase in VS Code:
Ctrl + Shift + P on Windows and LinuxCommand + Shift + P on macOSF1 to open the Command Palette.
Note: Make sure to select the text before running the transform command.
Here is a short clip that shows how to transform text to uppercase.

And, here is a clip that changes the selected text to lowercase.

The same approach can be used to transform the selected text to:
Here is an example that transforms the selected text to Title Case.

If you need to set keyboard shortcuts to transform text to uppercase or lowercase:
Ctrl + Shift + P on Windows and Linux.Command + Shift + P on macOS.F1 to open the Command Palette.

Enter to confirm.Enter to confirm.You can also hover over the line and click on the plus icon to add a keyboard shortcut.

For example, I use the Ctrl + Shift + U keyboard shortcut to change text
to uppercase and the Ctrl + Shift + U keyboard shortcut to transform text
to lowercase.

Here is a short clip that demonstrates what using the keyboard shortcuts looks like.

Alternatively, you can set the keyboard shortcuts directly in your
keybindings.json file:
Ctrl + Shift + P on Windows and Linux.Command + Shift + P on macOS.F1 to open the Command Palette.

keybindings.json file.[ { "key": "ctrl+shift+u", "command": "editor.action.transformToUppercase", "when": "editorTextFocus" }, { "key": "ctrl+shift+l", "command": "editor.action.transformToLowercase", "when": "editorTextFocus" } ]
You can also set the keybindings to "cmd+shift+u" and "cmd+shift+l" if you are on macOS.
Here is what my keybindings.json file looks like.

You can learn more about the related topics by checking out the following tutorials: