How to write superscript / upper index in Visual Studio?

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:

  • Where are the other letters in this Unicode block?
  • Why does the unicode Superscripts and Subscripts block not contain simple sequences of all letters?
  • Why is there no character for "superscript q" in Unicode?

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):

enter image description here

P. S. I'm not affiliated with this software by any means. Just a happy user.


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: ₀₁₂₃₄₅₆₇₈₉