To type the Spanish ñ, hold the Alt key and type 164 (lowercase) or 165 (uppercase) on Windows, or press Option + n followed by n on a Mac.
If you are learning Spanish or just need to write a specific name, missing the “ñ” character can be frustrating. It isn’t just a fancy “n” with a squiggle; it is a distinct letter in the Spanish alphabet with its own sound and meaning. Leaving it out can change año (year) to ano (anus), which creates awkward situations you definitely want to avoid.
Most standard English keyboards do not have a dedicated key for this character. Fortunately, every major operating system provides built-in tools to let you type it quickly. This guide breaks down exactly How to Do the Spanish Ñ on Windows, Mac, mobile devices, and within specific apps like Microsoft Word.
The Fastest Ways to Type Ñ
If you need the character right now and do not want to change system settings, use these quick shortcuts. These work on most standard US English layouts.
- Windows (with Number Pad) — Hold Alt and type 164 for ñ. Hold Alt and type 165 for Ñ.
- Mac — Hold Option and press n, then release both and press n again.
- iOS & Android — Long-press the n key on the on-screen keyboard until the ñ option appears, then slide your finger to select it.
These methods are great for one-off use. However, if you write in Spanish frequently, relying on codes becomes tedious. The sections below explain more permanent solutions and troubleshooting tips for different hardware setups.
How to Do the Spanish Ñ on Windows
Windows offers multiple ways to input special characters. The method you choose depends on your keyboard hardware and how often you switch between languages.
Method 1: Using Alt Codes
This is the most reliable method if you have a full-sized keyboard with a dedicated number pad on the right side. The numbers across the top of your keyboard will not work for this.
- Activate NumLock — Press the NumLock key to ensure the number pad is active.
- Position your hands — Hold down the Alt key on the left side of the spacebar.
- Enter the code — While holding Alt, type 0241 or 164 for lowercase ñ.
- Release Alt — The character will appear immediately after you let go of the Alt key.
- For uppercase Ñ — Hold Alt and type 0209 or 165.
Method 2: Typing on Laptops Without a Number Pad
Many modern laptops lack a physical number pad to save space. You have two workarounds here.
Use the Hidden Numpad:
Some laptops overlay a number pad on the letter keys (usually roughly on 7, 8, 9, U, I, O, J, K, L). Look for small numbers printed on these keys in a different color.
- Enable Function mode — Press Fn + NumLock (or sometimes just Fn + ScrLk) to activate this overlay.
- Type the code — Hold Alt and use the letter keys that correspond to 164.
- Disable Function mode — Press Fn + NumLock again to return to normal typing.
Use the Touch Keyboard:
Windows has a built-in on-screen keyboard that mimics a smartphone layout.
- Open the keyboard — Right-click the taskbar and select Show touch keyboard button. A keyboard icon will appear near your clock.
- Click the icon — Open the touch keyboard.
- Long-press ‘n’ — Click and hold the n key with your mouse or finger until ñ appears, then select it.
Setting Up the US International Keyboard
If you type Spanish words often, memorizing numbers is inefficient. The “United States-International” keyboard layout is the professional standard for bilingual writers. It keeps your keyboard mostly the same but turns certain keys into “dead keys” that modify the letter following them.
How to install it on Windows 10 & 11:
- Open Settings — Press the Windows Key and type “Language settings,” then press Enter.
- Select your language — Under “Preferred languages,” click on English (United States) and select Options.
- Add a keyboard — Scroll down to the Keyboards section and click Add a keyboard.
- Choose the layout — Scroll through the list and select United States-International.
How to use it:
Once installed, switch to this layout by pressing Windows Key + Spacebar until you see “ENG INTL” in your taskbar.
- Type the tilde — Press the ~ key (usually next to the 1 key). Nothing will happen on screen yet.
- Type the letter — Immediately press n. The system combines them to create ñ.
- Type a normal tilde — If you just want the symbol, press ~ and then Spacebar.
This layout also allows you to type accents easily (like é, á, í) by pressing the apostrophe key before a vowel. It effectively turns your standard hardware into a Spanish-ready tool without changing the physical keys.
How to Do the Spanish Ñ on Mac
macOS handles special characters more intuitively than Windows. You rarely need to dig into settings menus to find what you need.
The Option Key Shortcut
This is the standard method for touch typists.
- Hold Option — Press the Option key (sometimes labeled Alt).
- Press ‘n’ — Tap the n key once. You will see a highlighted tilde (˜) appear with a blank space under it.
- Press ‘n’ again — Type n to fill that space, creating ñ.
- For uppercase — Follow the same steps, but hold Shift when you press the final n.
The Press and Hold Method
If you prefer a visual interface similar to a smartphone:
- Hold the key — Press and hold the n key for about one second.
- Wait for the menu — A small popup menu will appear above the cursor displaying variations like ñ or ń.
- Select the character — Press the number displayed under the ñ (usually 1) or click it with your mouse.
Quick Note: This feature must be enabled in your System Settings. If holding the key simply repeats the letter (nnnnnn), you may need to adjust your “Key Repeat” settings in the Keyboard menu.
Typing Ñ on iPhone and Android
Mobile keyboards simplify this process significantly since screen real estate is limited. The hidden menu approach is standard across almost all mobile operating systems.
iPhone (iOS) Steps
- Open the keyboard — Tap any text field to bring up the keyboard.
- Long press — Touch and hold the n key. Do not lift your finger yet.
- Slide and release — Slide your finger over to the ñ character in the popup bubble and release.
Android Steps (Gboard & Samsung Keyboard)
- Long press — Hold the n key.
- Select — Slide to ñ.
Pro Tip for Android Users:
If you write in Spanish daily, go into your Gboard settings and add “Spanish” as a language. This enables predictive text for Spanish words. Often, you can type “manana” and the autocorrect will automatically change it to “mañana,” saving you the effort of long-pressing manually.
Shortcuts in Microsoft Word and Google Docs
Sometimes system-wide shortcuts conflict with other software. Word processing applications often have their own internal overrides to ensure you can always format text correctly.
Microsoft Word
Word uses “Control” combinations for accents.
- The Command — Press Ctrl + Shift + ~ (the tilde key).
- The Letter — Release those keys and strictly type n.
- For Uppercase — Press Ctrl + Shift + ~, release, then type Shift + N.
Google Docs
Google Docs relies heavily on your operating system’s shortcuts (the Windows/Mac methods listed above). However, if you are stuck on a computer where keyboard shortcuts are disabled or broken, you can use the Insert menu.
- Navigate — Go to Insert in the top menu.
- Select — Click Special characters.
- Search — Type “n” or “tilde” in the search box.
- Insert — Click the symbol to add it to your document.
How to Do the Spanish Ñ on Chromebook
Chromebooks utilize the “US International” layout logic by default in many settings, but you usually need to enable the “International” input method first.
Setting it up:
- Go to Settings — Click the time in the bottom right and select the gear icon.
- Advanced — Select Languages and inputs.
- Inputs — Under “Input method,” add US International.
Typing the character:
- The modifier — Hold Right Alt (specifically the Alt key on the right side of the spacebar).
- The letter — Press n.
This “Right Alt” (often called AltGr) is a powerful tool on Chromebooks and Linux systems for accessing a third layer of characters on your keyboard.
Why the Tilde Matters
Understanding the “why” can help you remember to use it. In Spanish, the tilde (the squiggle) is not an accent mark like the one on é. An accent mark tells you which syllable to stress. The tilde changes the letter entirely.
The letter N represents an alveolar nasal sound (tongue touching the roof of the mouth behind teeth). The letter Ñ represents a palatal nasal sound (the body of the tongue presses against the hard palate). It sounds like the “ni” in “onion” or “canyon.”
Common Words That Require It:
- Señor (Sir/Mr.)
- Mañana (Tomorrow/Morning)
- Niño (Boy)
- Español (Spanish)
- Baño (Bathroom)
Omitting it in formal writing looks unprofessional and can confuse native speakers. In search engine optimization (SEO) and URLs, Google treats “n” and “ñ” generally as the same for English searches, but for correct Spanish spelling and readability, including the tilde is mandatory.
Troubleshooting: When It Won’t Type
You tried the codes and shortcuts, but nothing happens. Here are the common culprits.
1. The Ten-Keyless Problem
If you try to type Alt+164 using the number row above QWERTY, it will not work. Windows Alt codes strictly require NumPad input. If you lack a Numpad, switch to the US International keyboard method.
2. Dead Keys Not Working
If pressing ~ and then n results in ~n instead of ñ, your keyboard layout is likely set to “US” instead of “US International.” Check your language bar near the clock.
3. Application Conflicts
Gaming software or hotkey managers (like AutoHotkey) sometimes hijack the Alt key. Try closing background apps if standard shortcuts fail.
4. HTML Entities for Web Design
If you are coding a website and the character is rendering as a question mark or a weird block, use the HTML entity instead.
- Code:
ñfor ñ - Code:
Ñfor Ñ
Key Takeaways: How to Do the Spanish Ñ
➤ Windows Shortcut — Use Alt + 164 for lowercase ñ or Alt + 165 for uppercase Ñ.
➤ Mac Shortcut — Press Option + n, release, then type n again.
➤ Mobile Method — Long-press the n key on iOS or Android keyboards.
➤ Permanent Fix — Install the US International keyboard layout for easier typing.
➤ Critical Distinction — Ñ is a separate letter, not just an accented N.
Frequently Asked Questions
Does the Alt code work on laptops?
Standard Alt codes (Alt+164) only work if your laptop has a dedicated number pad or a Function (Fn) numpad overlay. If your laptop lacks these, you must use the “US International” keyboard layout or the Windows touch keyboard.
How do I make the ñ capital?
On Windows, the Alt code for uppercase Ñ is Alt + 165 (or Alt + 0209). On Mac, press Option + n, then hold Shift while typing the second n. On mobile, hold Shift before long-pressing the n key.
Why does my keyboard type ~n instead of ñ?
This happens because your keyboard input language is set to standard “US” rather than “US International.” The standard layout does not recognize the tilde (~) as a dead key. Change your input method in your system settings to fix this.
Is ñ the same as n in passwords?
No. Computer systems treat “n” and “ñ” as completely different binary characters. If you set a password containing a ñ, you must type it exactly that way every time. Be careful using it in passwords if you frequently use public computers that might not have the correct layout enabled.
Can I map ñ to a single key?
Yes, but you need third-party software. On Windows, Microsoft PowerToys allows you to remap keys. You could, for example, remap an unused key (like Right Control) to output ñ directly, saving you from using two-step shortcuts.
Wrapping It Up – How to Do the Spanish Ñ
Typing the Spanish ñ is a small skill that makes a massive difference in the accuracy of your writing. While the Alt codes (164 and 165) remain the classic solution for Windows users with full keyboards, modern operating systems have pushed toward more intuitive methods like the long-press on mobile and the US International layout for desktops.
If you plan to write in Spanish regularly, stop struggling with numbers. Take two minutes to enable the International keyboard layout. It integrates the character into your natural typing flow, ensuring you never accidentally write ano when you meant año again.