Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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
That's useless to me when I need to type a u+23AF. – Will Jul 27 '09 at 12:35
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
@romkyns, I know, I even linked to that Windows hack in my own answer. Odd, I just don't know how to explain any better than I tried already ;-) – Arjan Dec 28 '09 at 16:51
@pipitas, that is exactly my point and I understand fine. (See also the question's editing history.) – Arjan Jun 26 '10 at 7:31
up vote 17 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.

share|improve this answer
Finally! An answer that works! – Will Jan 4 '10 at 14:01
@Kurt, the command-prompt is (much) more likely to be locked down than the calculator. – Synetech Jul 8 '12 at 18:10
Alternatively, set /a 0x4321 will also display 17185. – Marcks Thomas Dec 13 '12 at 12:31
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
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

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.

share|improve this answer
Not enough rep to edit the answer, but at least on my Win7 64-bit this required a reboot before it had any effect. – romkyns Nov 6 '09 at 12:36
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
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 at 18:02

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:

share|improve this answer

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.

share|improve this answer
+1, that works!!! Great! Ubuntu 12.04. Thank you! – Sony Santos Jul 24 '12 at 5:14
Unfortunately it only works in GTK+ applications. – Mechanical snail Nov 28 '12 at 0:25
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
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

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.

share|improve this answer

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

share|improve this answer
Doesn't work on KDE for me.. – Jack May 22 '13 at 1:17

You must log in to answer this question.

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 .