This is in Windows, but answers for other operating systems can be handy to others.

Most guides say something to the effect of "hold down the Alt key and type in the code on the keypad". This works fine for decimal codes (like 65 for 'A'), but not for hexadecimal codes (like U+0041 for 'A').

Some applicatons provide other facilities that will allow hexadecimal Unicode character codes to be typed and then transformed. Word allows you to type the code (such as 200f) and then convert it to Unicode by typing Alt-X.

I'm looking for a general method of doing this that will work with the standard input.

  • 1
    This works fine for unicode characters that don't include hex chars A through F. should read: for decimal codes. There are plenty of hexadecimal numbers that don't use A-F. Like 10, which is not ten then... – Arjan Jul 26 '09 at 7:47
  • 1
    That's useless to me when I need to type a u+23AF. – Will Jul 27 '09 at 12:35
  • 4
    My point is: you cannot type things like u+0041 (hex 41, decimal 65) using the numeric keypad either (as one would then need to type 65 rather than 41) -- So, using the Alt-trick works fine for decimal codes, but not for hexadecimal codes. – Arjan Jul 27 '09 at 13:08
  • 1
    @Will: the "alt+NN..." method expects decimal, not hex notation of the character position. Unicode uses hex. So if you want to type what Unicode represents as "U+23AF" you need to convert hex==23AF into decimal==9135, and then type "alt+9135". That's the only general method there is on offer. But: You wanted character may still not appear as expect in the text field or document, if your currently selected font does not have the "U+23AF" place filled (or if it is not a Unicode font in the first place!). – Kurt Pfeifle Jun 25 '10 at 22:45
  • @Arjan: you do not type hex chars with the "alt+nnn" method. You do only type decimal character codes. That's why you cannot type even straight "U+1234" strings (which do not contain any of your loathed "a-f" characters) into your numeric keypad as "alt+1234", but you need to convert hex==1234 into dec==4660 and then type "alt+4660" before you (MAY) get what you want. So your statement "using the Alt-trick does not work for hexdecimal codes" nails the problem exactly, but you missed to understand it yourself :-) – Kurt Pfeifle Jun 25 '10 at 22:49
up vote 21 down vote accepted

harrymc's answer is good, providing you're able/allowed to change the registry settings.

If not, you can use the Windows Calculator Accessory to convert from hexadecimal to decimal. The default mode won't do this: XP and Vista have a "Scientific mode, whereas Windows 7, 8, 8.1 and 10 have a "Programmer" mode.

Select Hex base, and then type in your hexadecimal number. Then change to Dec base to see the equivalent value in decimal. That's the number you need to type into your numeric keypad while holding down the Alt key.

This might depend on the input language, and you might need to prefix a zero to the decimal value.

  • you can also calculate with set /a in a command window ;-). To convert hex=4321 into decimal, just type set /a 4*16*16*16+3*16*16+2*16+1 and the result will show up as 17185 – Kurt Pfeifle Jun 25 '10 at 22:56
  • 3
    Alternatively, set /a 0x4321 will also display 17185. – Marcks Thomas Dec 13 '12 at 12:31
  • 5
    The answer is misleading, because it does not mention that a leading zero is needed when using a decimal number outside the Ascii range (> 127). If you want to type U+23AF and therefore convert 23AF to decimal, 9135, and then try using Alt 9135, you get “»” (U+00BB). You need to to type Alt 09135 (using the numpad) to get the right character. – Jukka K. Korpela Sep 9 '13 at 4:52
  • 8
    The method using decimal numbers depends on “input language” (as a Microsoft concept), so the results vary by system and program. For example, in most Windows programs, when the system language has been set to English or other Western language, only Windows Latin 1 characters can be typed this way. Any Alt 0n for n > 255 will then work “modulo 256”, i.e. with n reduced to range 0...255 by dividing by 256 and taking the remainder. – Jukka K. Korpela Sep 9 '13 at 5:06
  • 2
    This answer is wrong. Alt+0nnn (0-255) inputs a character from the system's ANSI codepage (e.g. 1252). The value entered is modulo 256 as mentioned above. Alt+nnn (0-255), without a leading zero, inputs a character from the system's OEM codepage (e.g. 437 or 850). However, the first 31 codes aren't the normal ASCII control characters, but are instead the glyphs that were displayed for these characters on 1980s PCs running DOS. In the Windows API, the latter corresponds to using the MB_USEGLYPHCHARS flag when decoding bytes to Unicode via MultiByteToWideChar. – eryksun Oct 9 '17 at 16:48

Found this in How to enter Unicode characters in Microsoft Windows :

I tested this on Windows XP and Windows 2003. This method works regardless of any of your language settings, but is the most cumbersome to type:

  1. Press and hold down the Alt key.
  2. Press the + (plus) key on the numeric keypad.
  3. Type the hexidecimal unicode value.
  4. Release the Alt key.

Alas, this appears to require a registry setting. It was already set on my computer, but some readers report that this method didn't work for them, and this is probably why. If you don't know what the registry is, please don't try this. Under HKEY_CURRENT_USER\Control Panel\Input Method, set EnableHexNumpad to "1". If you have to add it, set the type to be REG_SZ.

You should log off then log on after this registry change, or even reboot.

  • 1
    if I don't know what the registry is, then I don't know how to try neither. – Vanuan Apr 6 '12 at 17:28
  • 4
    If you don't know what the registry is, you shouldn't ever touch it. Ask someone you know for help. – Wug Apr 17 '13 at 18:07
  • +1 but a couple of things: (i)in Both Firefox and IE if the hex code you're trying to type contains a leeter corresponding to the Alt+[letter] shortcut for a menu, the menu drops down and you don't get your character (this break E&F on both, A on IE and B on Firefox, notepad works fine as does the winkey+R "run" box) ; (ii)REG_SZ may appear in the right-click new entry menu as "Registry String" – Chris H Jun 19 '15 at 9:04
  • Is this supposed to work in all applications? I got it to work in notepad, notepad++, Firefox and even Excel, but not in Word, Outlook, PowerPoint nor Lync. This is on W7. – Didier L Mar 8 '16 at 18:02
  • 3
    Hi harrymc. How do I type in letters contained in hex? example: "👉" = 👉 - after I hit F alt menu command gets executed on windows. It doesn't fly with conversion to decimal (128073) not adding leading zeroes. – Matas Vaitkevicius Jun 9 '16 at 11:22

On Mac OS X: open International in System Preferences, and in Input Menu select "Unicode Hex Input" to add this option to the input menu. Sounds obvious, but this is well hidden in the long list of languages, between Ukrainian and Vietnamese. When selected, hold down Option and type the 4 digit hex code.

Also on OS X: Calculator can be set to Programmer mode (Cmd-3), which allows for entering decimal, octal and hexadecimal codes, which are then displayed as ASCII or Unicode. However, Copy will give one the code, not the character equivalent(s). Anyone?

(For Windows, see How to enter Unicode characters in Microsoft Windows; for other input methods see Wikipedia.)

And here on Super User:

And to go into extremes:

In Ubuntu (and variants thereof, like LinuxMint) you can enter Unicode values by pressing Ctrl+Shift+u followed by the Unicode value and Enter, for example:

Ctrl+Shift+u 263a then Enter yields:

Text: ☺
Screenshot: alt text

You might be able to couple this with AutoHotkey for easier input, or possible input in Windows.

  • 1
    Unfortunately it only works in GTK+ applications. – Mechanical snail Nov 28 '12 at 0:25
  • 2
    You can also hold down Ctrl-Shift while typing the code, which avoids having to press Enter afterwards. – Mechanical snail Nov 28 '12 at 0:27
  • 1
    I have found a better solution: You can add accent marks to any preceding character using Unicode combining diacritical marks. Unicode 0301 - 0308 are useful for Pinyin. for example: "a" + [ctrl][shift][u] + 0301 [return] -> á. The pinyin list: ó -> 0301; ò -> 0300; ō -> 0304; ŏ -> 0306; ö -> 0308; see – emf Feb 1 '13 at 4:22

I have written a small AutoHotkey based Unicode Input tool because I did not find a better solution. You can insert unicode characters with Shift+Ctrl+U.

Unicode dialog

Basically, it converts the entry to a unicode character and “types” it at cursor position.

It does not support 6-digit unicode characters. Also, if you have an input field where all text is selected on focus loss, all text will be overwritten (I think I remember an old Firefox version showed this behaviour).

As a reference, here the AutoHotkey source if you want to compile it by yourself:

#SingleInstance force
;Menu, Tray, icon, unicode.ico
Menu, Tray, nostandard ; Put the following menu items on top (default: bottom)
Menu, Tray, add, Info, InfoHandler, -10
Menu, Tray, add
Menu, Tray, standard ; Add default menu items at the bottom

MsgBox Press Shift+Ctrl+U to get an entry field for unicode points (see for a list).`n`nAuthor: Simon A. Eugster <> /

InputBox, codepoint, Unicode code point, U+
if not ErrorLevel
    Send {U+%codepoint%}

It also depends where you want to use the special characters. With MS Office apps, you don't have to resort to knowing the ASCII codes for certain characters -- for example, to type a diaresis (i.e., the two dots you see above some characters in words such as naïve), in Word/Outlook/etc you can hit Ctrl + ':' (i.e., Ctrl+Shift+;) followed by 'i'.

There's a list of shortcuts available at ... just scroll down to "International Characters".

I don't know whether any non-Office apps support similar shortcuts.

Linux (including Qt/KDE applications)

As JMD mentioned, you can hold down Ctrl-Shift, type u1f4a9, and release in order to type U+1F4A9 in GTK+ applications (including GNOME programs, Firefox, Chromium, and LibreOffice, even under KDE). Some programs also support typing in sequence Ctrl-Shift-U, 1, f, 4, a, 9, Enter.

Unfortunately, this doesn't work in Qt applications (including KDE programs, Mathematica, and VLC). For BMP characters, there is a Unicode IBus input method. To enable, open IBus preferences and add the "Other - unicode (m17n)" input method (the two packages ibus-m17n and ibus-qt4 must be installed). When the cursor is in a text area, activate the input method (using the IBus toolbar or the keyboard shortcut). While active, the input method lets you type Ctrl-Shift-U followed by 4 hex digits, to input the corresponding Unicode character. This only works for BMP characters, though.

(Tested under Ubuntu.)

  • Doesn't work on KDE for me.. – Jack May 22 '13 at 1:17
  • where can i find the IBus preferences? – anarcat Oct 26 at 15:44

Perhaps not exactly what you're asking, but it what I was looking for. On Windows 10, you can hit Win+. or Win+; to open an emoji browser:

enter image description here

As you can see in the above image, you can also search by simply typing.

protected by BinaryMisfit Oct 21 '10 at 19:40

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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