It is possible, but I don't know how is it done.
-
Related post - [How to find the unicode of the subscript alphabet?](https://stackoverflow.com/q/17908593/465053) – RBT Jun 22 '18 at 03:55
9 Answers
Use the Windows Charmap.exe applet. In the Font combobox select a font that has a lot of glyphs, Arial Unicode MS is a very good choice. Tick the Advanced view checkbox and type "super" in the Search box. The grid will show all superscript glyphs, select and copy from that and paste into your source code.
Or copy/paste one of these: ¹²³⁴⁵⁶⁷⁸⁹⁰
Subscript characters: ₀₁₂₃₄₅₆₇₈₉

- 922,412
- 146
- 1,693
- 2,536
Adding more details to complement @HansPassant's answer. Other frequently used sets which can be used as is by copy/paste:
Superscript small case letters: ᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖʳˢᵗᵘᵛʷˣʸᶻ
Subscript small case letters: ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ
If you're wondering why few letters are missing in above series then please read below posts:

- 24,161
- 21
- 159
- 240
Since there is a tag visual-studio-2012, I assume you are running Windows. There is a great opensource program called WinCompose, which allows to use easy-to-remember and intuitive shortcuts for a huge amount of Unicode symbols, including numerical super- and subscripts. Every shortcut is invoked via a Meta
key (e.g. Right Alt
), for example:
Meta
+^
+1
gives¹
;Meta
+_
+9
gives₉
.
WinCompose also supports search, can be run in background, and eliminates tedious procedure of calling Character Map with subsequent copy-pasting or remembering the Unicode charsets (but the latter are also listed):
P. S. I'm not affiliated with this software by any means. Just a happy user.

- 869
- 2
- 19
- 26
One more way for WPF users,
<TextBlock >
<Run>x</Run>
<Run FontSize="8" BaselineAlignment="TextTop" >2</Run>
</TextBlock>
Change BaselineAlignment to TextBottom if you want to use as subscript.

- 374
- 1
- 4
In VsCode download the extension "Fast Unicode Math Characters".
The hotkeys for ₂
is \_2
.
The hotkeys for ²
is \^2
.

- 1,181
- 2
- 21
- 35
Looks like there are some simple tags that you can use to make any text superscript/subscript. The superscript tag is <sup>
and the subscript tag is <sub>
.
-
This is correct about HTML web pages but OP's question is about Visual Studio IDE. – RBT Dec 03 '21 at 03:59
This is how usually I tend to do it on Mac.
- In the VS code, hit (Control + Command + Space) to bring up the Character selector and search for 'superscript' in the search box.
- Click on required superscript and add it. And here is the result. Screenshot are from the VS code only.
This approach should work across most of the apps in the Mac. Tested in MacOS 12.5. (Monterey)

- 148
- 2
- 13
use (Ctrl + Shift + P) command to apply superscript and subscript in Visual Studio.
-
1This isn't a default shortcut for Visual studio, i would guess you customised in some way? https://learn.microsoft.com/en-us/visualstudio/ide/default-keyboard-shortcuts-in-visual-studio?view=vs-2019 – Crog Jan 07 '21 at 10:43
-
This keyboard combination does nothing in Visual Studio. I'm using VS 2019 with default keyboard shortcuts. – RBT Dec 03 '21 at 03:57
There are several solutions. Personally, I simply formaat the label text in Word, use a screen capture and save it as an image that I use with a label.

- 25
-
1This solution worked great for me. I just want to put an equation on my form. I don't want to reinvent a control. Ain't nobody got time for that. However, instead of using the image on the label, I used an image on a System.Windows.Forms.PictureBox so that I could autosize the ![picture][1] easily. [1]: http://i.stack.imgur.com/Ry7BT.png – GregNash Apr 28 '14 at 21:49