SymbolFYI

Unicode Hex Input on macOS: Type Any Character by Code Point

How-To Keyboard Mastery Tháng 11 12, 2024

The Option key combos and dead keys on macOS cover the most common special characters, but they stop well short of the full Unicode range. There are over 149,000 characters in Unicode — from obscure mathematical operators to ancient scripts to geometric shapes — and most of them have no dedicated shortcut. Unicode Hex Input is the macOS method that gives you access to all of them, as long as you know the character's code point.

What Is Unicode Hex Input?

Unicode Hex Input is a keyboard input source built into macOS. When it's active, holding Option and typing a four-character hexadecimal code produces the Unicode character at that code point. It's the direct, no-lookup-required way to type any character if you know its U+ value.

This is the same principle as HTML character references (— for em dash) or CSS content values (content: '\2014') — but instead of writing code, you're typing the character directly into any text field.

Enabling Unicode Hex Input

Unicode Hex Input is not active by default. You need to add it as an input source in System Settings.

Step-by-Step Setup

On macOS Ventura and later (System Settings):

  1. Open System Settings (click the Apple menu > System Settings)
  2. Click Keyboard in the sidebar
  3. Under "Text Input," click Edit next to "Input Sources"
  4. In the sheet that opens, click the + button at the bottom left
  5. In the search box, type Unicode
  6. Select Unicode Hex Input from the results (it's under the "Other" category at the bottom)
  7. Click Add

On macOS Monterey and earlier (System Preferences):

  1. Open System Preferences > Keyboard
  2. Click the Input Sources tab
  3. Click + at the bottom left
  4. Search for "Unicode" in the search box
  5. Select Unicode Hex Input and click Add

Showing the Input Menu in the Menu Bar

To switch between input sources easily, enable the menu bar indicator:

  • In System Settings > Keyboard > Text Input: turn on "Show Input menu in menu bar"
  • A flag or keyboard icon will appear in your menu bar

Switching to Unicode Hex Input

  • Menu bar: Click the input menu icon and select Unicode Hex Input
  • Keyboard shortcut: If you have multiple input sources, Cmd+Space or Ctrl+Space (depending on your Spotlight shortcut settings) cycles through them. You can also configure a specific shortcut in System Settings > Keyboard > Keyboard Shortcuts > Input Sources.

When Unicode Hex Input is active, the menu bar icon typically shows a small character or the flag may change. Test that it's active before typing your first code.

Using Unicode Hex Input

The Input Method

  1. Switch to Unicode Hex Input
  2. Place your cursor in any text field
  3. Hold Option
  4. While holding Option, type the four hexadecimal digits of the code point
  5. Release Option — the character appears

The four digits appear as you type them, showing the code being entered, then transform into the final character when you release Option.

Basic Examples

Hold Option + type Code Character Name
2014 U+2014 Em dash
2013 U+2013 En dash
2026 U+2026 Ellipsis
00B0 U+00B0 ° Degree sign
00A9 U+00A9 © Copyright
00AE U+00AE ® Registered
2122 U+2122 Trade mark
03C0 U+03C0 π Pi
03A9 U+03A9 Ω Omega
2665 U+2665 Black heart suit
2660 U+2660 Black spade suit
2663 U+2663 Black club suit
2662 U+2662 White diamond suit
2603 U+2603 Snowman
2764 U+2764 Heavy black heart
2713 U+2713 Check mark
2717 U+2717 Ballot X
2192 U+2192 Right arrow
21D2 U+21D2 Rightwards double arrow
221E U+221E Infinity
2260 U+2260 Not equal to
2264 U+2264 Less than or equal
2265 U+2265 Greater than or equal
00BD U+00BD ½ Vulgar fraction one half
00BC U+00BC ¼ Vulgar fraction one quarter
2153 U+2153 Vulgar fraction one third

Codes with Leading Zeros

Code points shorter than four hex digits must be padded with leading zeros. U+00B0 (degree sign) is entered as 00B0 — not B0. If you type only two digits and release Option, macOS looks up code point U+00B0 if you typed 00B0, but 00b0 (lowercase) also works — hex input is case-insensitive.

A useful mental model: always type exactly four characters. Code points U+0000 through U+000F need three leading zeros (000A, 000D). Common Latin and punctuation characters (U+0020–U+007E) need two leading zeros (0020 for space, 0041 for A).

Finding Code Points

To use Unicode Hex Input, you need to know the code point. Three ways to find it:

  1. Our Unicode Lookup tool: Use our Unicode Lookup tool — search by character name, paste the character, or browse by Unicode block.

  2. macOS Character Viewer: Open with Ctrl+Cmd+Space, find your character, and check the detail panel which shows the Unicode code point.

  3. Terminal: Use Python to look up a character: python python3 -c "print(hex(ord('—')))" # Output: 0x2014 Or for any named character: python python3 -c "import unicodedata; print(hex(ord(unicodedata.lookup('EM DASH'))))" # Output: 0x2014

The BMP Limitation

Unicode Hex Input on macOS works only for characters in the Basic Multilingual Plane — code points U+0000 through U+FFFF. This covers the vast majority of useful characters: all Latin, Greek, Cyrillic, Arabic, Hebrew, CJK, and most symbols.

Characters above U+FFFF (code points U+10000 and beyond) are in supplementary planes. These include: - Most emoji (U+1F300–U+1FFFF) - Historic scripts (cuneiform, hieroglyphics, etc.) - Mathematical Alphanumeric Symbols (U+1D400–U+1D7FF) - Musical Symbols (U+1D100–U+1D1FF) - Supplementary CJK characters

You cannot type supplementary-plane characters with Unicode Hex Input.

Workaround for Supplementary Plane Characters

For emoji and supplementary characters: - Use Character Viewer (Ctrl+Cmd+Space) — it handles all Unicode - Use the emoji picker (Fn key on modern Macs) - Copy from a Unicode reference site and paste

Alternatively, you can calculate the UTF-16 surrogate pair for a supplementary character, but this doesn't work with Unicode Hex Input directly — it only accepts BMP code points.

Unicode Hex Input vs. Character Viewer

Both methods can type arbitrary characters. When should you use each?

Situation Unicode Hex Input Character Viewer
You know the code point Best — type it directly Slower — need to navigate
You don't know the code point Requires lookup first Good — browse or search
Emoji and supplementary chars Not supported Supported
Speed (with known code) Fastest Moderate
No setup Requires enabling Always available
Works in all apps Yes Yes (copy-paste in some)
Developer muscle memory Excellent for known codes Not as fast

For developers who regularly use specific characters (arrows, math symbols, Greek letters), memorizing a handful of code points and using Unicode Hex Input is faster than any other method.

Per-App Behavior

Unicode Hex Input works in most macOS applications: - TextEdit, Pages, Numbers, Keynote - Safari address bar and text fields - Terminal (though some sequences may be intercepted by the shell) - VS Code, Xcode, BBEdit, and most professional editors - Slack, Notion, and most Electron apps

A small number of applications may intercept Option key events before macOS processes them. If a code isn't working in a specific app, try Character Viewer as an alternative.

Practical Workflows

For Technical Writers

Technical documentation often needs arrows (→, ⇒, ⟶), math symbols (≤, ≥, ≠), and Greek letters (α, β, γ). Memorize five or six codes you use daily:

  • 2192 → (right arrow)
  • 2260 ≠ (not equal)
  • 03B1 α (alpha)
  • 03B2 β (beta)
  • 2014 — (em dash)
  • 2026 … (ellipsis)

For Unicode and Character Reference Work

If you spend time analyzing Unicode characters, keeping Unicode Hex Input active and using our Unicode Lookup tool in a browser tab creates a fast workflow: look up the code point, switch to your document, type it in.

Switching Input Sources Efficiently

When you only occasionally need Unicode Hex Input, avoid the friction of manually switching:

  1. Set a keyboard shortcut: System Settings > Keyboard > Keyboard Shortcuts > Input Sources > "Select the previous input source" (Ctrl+Space is a common choice)
  2. Toggle to Unicode Hex Input, type your character, toggle back

The toggle is fast once the shortcut is configured.

Relationship to Other Unicode Input Methods

macOS provides several overlapping ways to type Unicode characters:

Method Scope Speed Setup
Option key combos ~70 characters Very fast None
Dead keys Accented Latin Fast Depends on layout
Press-and-hold accent menu Accented Latin Moderate None
Unicode Hex Input U+0000–U+FFFF Fast (if code known) Enable keyboard
Character Viewer All Unicode Moderate–slow None
Text Replacement Custom set Fastest Pre-setup required

The ideal setup uses all of these in combination: Option key combos for the most common symbols, dead keys or press-and-hold for accents, and Unicode Hex Input for the occasional obscure character.


Next in Series: Windows has its own extensive Alt code system for special character input — including two overlapping numbering systems from different eras of computing. See Windows Alt Codes: Complete Reference for Special Characters for the full reference guide.

Ký hiệu liên quan

Thuật ngữ liên quan

Công cụ liên quan

Thêm hướng dẫn