336

What is the Intellij shortcut to convert code to upper or lower case?

8 Answers 8

557

Ctrl + Shift + U

Or ⌘ Command + Shift + U if you are using Mac OSX.

In the future, hit the Ctrl + Shift + A shortcut key and search for the action that you are after. In this case, search for: Toggle Case.

5
  • 10
    In case it helps someone who wanders in here: In Eclipse, this is CMD+SHFT+Y (lower) and CMD+SHIFT+X (upper)
    – gMale
    Commented Aug 1, 2013 at 7:53
  • 27
    I have trouble where sometimes pressing CTRL+SHIFT+U just replaces the selected text with the letter U.... sometimes it works, but usually it just does the replacing.
    – Trenton
    Commented Jul 31, 2014 at 16:15
  • 42
    @Trenton - if you're using Ubuntu CTRL+SHIFT+U by default is used for Unicode input thus you're seeing the letter u. If you don't use it you should probably unbind it (looks like it's not so easy askubuntu.com/questions/367646/…) or define a new shortcut for this action in Intellijf
    – Kuba
    Commented Dec 11, 2014 at 11:35
  • 1
    export XMODIFIERS="" ./bin/idea.sh solves to me, using Ubuntu.
    – deFreitas
    Commented Jul 26, 2018 at 22:46
  • 1
    @Kuba in October 2018 I can confirm that Debian does this too Commented Oct 10, 2018 at 17:32
47

According to the documentation :

Ctrl + Shift + U : Toggle case of the selected text block

1
  • 1
    Obsolete, do not toggle any more. It will only make characters upper case. Commented Jul 17, 2017 at 9:36
30

I would highly recommend String Manipulation plugin for Intellij.

With a simple Alt + M (Option + M for Mac) you get:

enter image description here

So you can easily manipulate with strings in the following way:

enter image description here

0
28

If you are an Ubuntu User you will notice that Ctrl + Shift + U will add an u instead of toggling the case.

The solution for me was to change the KeyMap from:

Ctrl + Shift + U --> Alt + Shift + U

You can do so with this Docs

1
4

Please check your hot-key settings first. You could go to

File > Settings > Search for Keymap > Search for Toggle Case

and see what hot-key has been configured. See screenshot below:-

enter image description here

If not configured, create a new one for yourself.

4

Select the text/word/line to be modified and hitting Cntrl+Shift+U or Command+Shift+U` (MAC) works. Please look here for more detail

2
  • 1
    Any specific reason it is down voted? I just verified in IntelliJ and confirmed this Commented Aug 24, 2017 at 21:03
  • Had to convert a project from MSSQL (Pascal case) to Postgres (lowercase). This saved me a ton of time!
    – cbmeeks
    Commented Jun 22, 2022 at 14:57
2

Toggle case in Intellij IDE:

For Ubuntu OS use Ctrl+Shift+x or Ctrl+Shift+y

For Windows OS use Ctrl+Shift+u

0

Toggle case in Mac OS and Windows OS :

Ctrl + Shift + U

but in Ubuntu OS you can use it in tab Edit=>Toggle Case or change key map setting of Toggle Case to :

Alt + Shift + U

Not the answer you're looking for? Browse other questions tagged or ask your own question.