How to Type ñ on Any Keyboard: Windows, Mac and Phone
In this article
To type ñ (n with a tilde), hold Option and press n on a Mac, then press n again; on Windows hold Alt and type 164 on the numeric keypad (or 0241); on a phone, press and hold the n key and slide to ñ. The uppercase Ñ works the same way: Option+n then Shift+n on Mac, Alt+165 or Alt+0209 on Windows, long-press N on a phone. Once you know these three patterns, you can type every Spanish character without changing your keyboard layout.
Type ñ on a Windows PC with Alt Codes or the Touch Keyboard
Windows gives you two reliable routes. The first is the Alt code method: hold the Alt key and type a number on the numeric keypad, then release Alt. If your laptop has no numeric keypad, enable Num Lock and use the embedded number keys (usually the letters J, K, L and nearby keys on smaller laptops), or use the second method below.
The Alt codes for Spanish characters are:
- ñ = Alt+164, Ñ = Alt+165
- á = Alt+160, é = Alt+130, í = Alt+161, ó = Alt+162, ú = Alt+163
- ü = Alt+129, ¿ = Alt+168, ¡ = Alt+173
The second route is the touch keyboard. Right-click a blank spot on the taskbar and enable the touch keyboard option, then open the keyboard and press and hold the n key — a small pop-up shows ñ, and you click it. This mirrors how phones work and is the easiest option on tablets and touchscreen laptops. Exact menu labels can differ slightly depending on your Windows version, but both methods have existed for many years.
Type ñ on a Mac with Option Key Shortcuts
On macOS you compose accented characters with the Option key, which is quicker than Alt codes once you learn the pattern. For ñ, press Option+n, release both keys, then press n again. The first keystroke creates a tilde that waits for its letter; the second attaches it.
The same pattern covers all Spanish accents:
- Option+n, then n = ñ
- Option+e, then a vowel = á, é, í, ó, ú
- Option+u, then u = ü
- Option+? (Shift+/) = ¿; Option+1 = ¡
For capitals, add Shift to the letter: Option+e then Shift+A gives Á, and Option+n then Shift+N gives Ñ. Alternatively, press and hold a letter key on a Mac for a pop-up of accent options, then press the number shown under your choice — hold e and pick 1 for é, for example.
Type ñ on iPhone, iPad and Android
Both major mobile platforms use press-and-hold, so no setup is needed. Touch and hold the n key until a small row of alternatives appears, then slide your finger to ñ and release. The same gesture on a, e, i, o and u shows accented versions of each vowel, and holding other punctuation keys reveals variants like ¿ and ¡.
One detail catches people out: you must slide, not lift. If you lift your finger first, the pop-up closes and you get a plain letter. Press, hold, slide, release — in one motion.
Switch to the US International Layout for Frequent Typing
If you type Spanish regularly, per-character shortcuts get tedious. Adding the US International keyboard layout lets you type accents with a dead-key sequence: press the apostrophe key, release it, then press a vowel to get á, é, í, ó or ú. For ñ, press Shift+6 (the tilde key, next to the 6), release, then press n.
To add it, open Settings and look for the language or keyboard section, choose English, and add the United States (International) layout; you can then switch layouts from the keyboard icon in your menu bar or taskbar. Menu names vary by device and system version, so search Settings for "keyboard" if the path differs. The trade-off is small: a few punctuation keys behave differently because they wait for a letter, so if you need a straight apostrophe you press it once, then press the spacebar.
Why Alt Codes Fail and How to Fix the Attempt
The most common failure is typing Alt codes without a working numeric keypad — the Alt method ignores the number row along the top of the keyboard entirely. If nothing appears, that is almost always the cause. Check that Num Lock is on (many laptops light an indicator), or switch to the touch keyboard method instead.
A second snag: Alt codes must be typed with the left Alt key on some setups, and the number must be entered as a complete sequence (164, not 1-6-4 with pauses between separate Alt presses). If you get a wrong character, you released Alt mid-sequence.
There is also a persistent misconception that you need to install a Spanish keyboard or buy different hardware to type ñ. You do not. Every standard US keyboard sold today can produce ñ, accented vowels and the inverted punctuation marks using only the methods above; a physical Spanish layout just makes them faster, not possible.
Practice the Sequences with a Real Sentence
Try typing this: El niño pequeño dice: "¿Cómo estás?" On a Mac it is Option+n then n for ñ, Option+e then e for é, Option+? for ¿, and Option+e then o for ó. On Windows it is Alt+164, Alt+130, Alt+168 and Alt+162 in the same spots. If the sentence comes out clean, you have every character you need for everyday Spanish.
A quick copy source helps in a pinch: keep ñ, ¿, ¡, á, é, í, ó, ú and ü saved in a note, and paste when you are on someone else's machine or filling in a form that rejects shortcuts. Character Map on Windows (search "Character Map" in the Start menu) and the Emoji & Symbols viewer on Mac (Edit menu > Emoji & Symbols in most apps) also let you double-click any character to insert it, with the Alt code or keystroke displayed for each one.