How to Type Ñ and ñ on Windows (Laptop, Word and Excel)

You’re typing a name like Peña or a word like año on an English keyboard, and there is no ñ key. If your keyboard has a numeric keypad, hold Alt and type 164 for ñ or 165 for Ñ (Alt + 0241 and Alt + 0209 also work). No keypad? Press Windows + . (period) and pick ñ from the Symbols tab, or add the US-International keyboard and type ~ then n.

Pick the method that fits your keyboard

All of these work on current versions of Windows 11, and on Windows 10 unless noted. The best choice depends on how often you type Spanish and whether your keyboard has a separate number pad on the right.

Method Keys or path Needs a numeric keypad? Best for
Alt code Alt + 164 (ñ), Alt + 165 (Ñ) Yes Desktop keyboards, occasional use
Emoji and symbols panel Windows + . then Symbols No Laptops, any app
US-International keyboard ~ then n No Typing Spanish often on an English keyboard
Spanish keyboard layout ñ gets its own key No Writing mostly in Spanish
Word shortcut Ctrl + Shift + ~ then n No Word and Outlook
Unicode code in Word 00F1 then Alt + X No Word, when you remember codes
Excel Symbol dialog or formula Insert > Symbol, or =UNICHAR(241) No Spreadsheets
Character Map Select, Copy, paste No Older apps where nothing else works

Type ñ with Alt codes

Alt codes are the fastest route when your keyboard has a number pad. Microsoft’s list of ASCII and Unicode Latin-based characters gives Alt + 164 for ñ and Alt + 165 for Ñ.

  1. Click where you want the letter to appear.
  2. Make sure Num Lock is on. On most keyboards a light shows when it is.
  3. Hold down the Alt key.
  4. While holding Alt, type 164 on the numeric keypad for ñ, or 165 for Ñ.
  5. Let go of Alt. The letter appears.

The four-digit codes Alt + 0241 (ñ) and Alt + 0209 (Ñ) do the same job using a different code page. They are worth knowing if a three-digit code ever gives you an unexpected character in a particular app.

The numbers must come from the keypad. The number row above the letters doesn’t work for Alt codes, which is the most common reason the code “does nothing.”

On a laptop without a number pad

Some laptops, especially older or smaller models, have a hidden keypad printed on the letter keys (often 7, 8 and 9 on the U, I and O keys). It’s usually turned on with a key combination such as Fn + Num Lock, Fn + F11 or Fn + Scroll Lock, but the exact keys vary by maker and model, so check the small labels on your keys or the laptop’s manual. Once it’s on, hold Alt and type the code on those letter keys, then turn the keypad off again so your letters work normally.

If your laptop has no keypad at all, skip Alt codes and use the symbols panel below, or plug in a USB keyboard with a number pad.

Use the emoji and symbols panel (no keypad needed)

Windows has a built-in panel for emoji and symbols, and it works in almost any app: browsers, email, Word, Excel and chat apps.

  1. Click where you want ñ.
  2. Press Windows + . (the Windows logo key and the period key together).
  3. In the panel that opens, select the Symbols tab (the Ω icon).
  4. Open the category of Latin letters with accents (shown as an accented letter icon) and scroll to ñ or Ñ.
  5. Click the letter to insert it.

The panel keeps recently used symbols at the front, so the second time you need ñ it’s one click away. For a full tour of what the panel offers, see using the emoji keyboard in Windows.

Add the US-International keyboard

If you write in Spanish every week, a keyboard layout beats any shortcut. The United States-International layout keeps the English key positions but turns a few keys into “dead keys” that wait for the next letter. Typing the tilde and then n gives ñ.

Add the layout in Windows 11

These steps follow Microsoft’s page on managing input and display language settings.

  1. Open Settings and go to Time & language > Language & region.
  2. Next to your display language (for example, English (United States)), click the three dots and choose Language options.
  3. Under Keyboards, click Add a keyboard.
  4. Choose United States-International from the list.

On Windows 10 the wording differs slightly: open Settings > Time & Language > Language, select your language, click Options, then Add a keyboard.

Switch to it and type ñ

  1. Press Windows logo key + Spacebar to cycle through your keyboards, or click the input language icon near the clock on the taskbar and pick the layout.
  2. Press Shift + ` (the tilde key, usually left of the 1 key). Nothing appears yet.
  3. Press n for ñ, or Shift + n for Ñ.

Expect one adjustment: the apostrophe and quote keys also become dead keys on this layout, so to type a plain ‘ or ” you press the key and then the Spacebar. People who type a lot of code or quotes often switch back to the regular US layout for that work, which is a two-key shortcut once both are installed.

Or use a Spanish layout

A Spanish keyboard layout puts ñ on its own key, but it also moves several symbols around, so it’s easiest if you have a physical Spanish keyboard or don’t mind learning new positions. Adding it uses the same Language options screen (pick the Spanish language and its keyboard). The steps for adding and switching are covered in how to use a Spanish keyboard on Windows.

Type ñ in Microsoft Word

Word has two built-in methods that need no keypad and no extra layout, both listed on Microsoft’s page of keyboard shortcuts for international characters.

The tilde shortcut

  1. Press Ctrl + Shift + ~ together (the tilde needs Shift on most English keyboards), then release.
  2. Type n for ñ, or Shift + n for Ñ.

The same shortcut makes ã and õ. It works in Word and Outlook, but not in most other apps.

The Unicode code and Alt + X

  1. Type 00F1 (that’s zero, zero, F, one) for ñ, or 00D1 for Ñ.
  2. Press Alt + X. Word converts the code into the letter.

If the code sits right after other letters (as in “Espa00F1”), Word may read too many characters as the code. Type a space first, convert, then delete the space.

Word also has Insert > Symbol > More Symbols, where ñ sits in the Latin-1 Supplement subset. That dialog and other accents are covered in adding accent marks in Word.

Type ñ in Excel

Excel has no Ctrl + Shift + ~ shortcut for ñ, but it has a Symbol dialog and formulas that return the letter.

Insert the symbol

  1. Double-click the cell, or click in the formula bar, where the letter should go.
  2. On the Insert tab, click Symbol (usually at the right end of the ribbon).
  3. Set Font to (normal text) and Subset to Latin-1 Supplement.
  4. Select ñ (character code 00F1) or Ñ (00D1), click Insert, then Close.
Spreadsheet with the Symbol dialog open and the n with tilde character selected, and a cell using the CHAR 241 formula
Insert ñ from the Symbol dialog, or build it into text with CHAR(241).

Use CHAR or UNICHAR in a formula

  • =UNICHAR(241) returns ñ and =UNICHAR(209) returns Ñ. UNICHAR uses Unicode values, so the result is the same on Windows and Mac. Microsoft lists it for Excel in Microsoft 365, Excel 2024, 2021, 2019 and 2016.
  • =CHAR(241) and =CHAR(209) give the same letters on Windows, where CHAR uses the ANSI character set. On a Mac, CHAR uses a different character set, so the results can differ.
  • To build a word, join the pieces: =”Espa”&UNICHAR(241)&”a” shows España.

A formula result changes if someone edits the formula, so if you want the letter as plain text, copy the cell and paste it back with Paste Special > Values.

Set up an AutoCorrect entry

If you type ñ in a spreadsheet all day, an AutoCorrect entry turns a short code into the letter. In Excel for Windows, go to File > Options > Proofing > AutoCorrect Options. In Replace, type a code you’d never use otherwise (such as n~~), paste ñ into With, then click Add and OK. Typing the code followed by a space or Enter now produces ñ.

Character Map and copy and paste

Character Map is an older Windows tool, but it still works in apps that ignore other methods.

  1. Search for Character Map from Start (on Windows 10, use the search box on the taskbar) and open it.
  2. Pick a font such as Arial or Calibri and find ñ or Ñ in the grid.
  3. Click the letter, click Select, then Copy.
  4. Go back to your document and paste with Ctrl + V.

The quickest fallback of all is to copy ñ from a page where it already appears (like this one) and paste it. It’s not elegant, but it works anywhere text can be pasted.

On a touchscreen PC, the Windows touch keyboard typically works like a phone keyboard: press and hold the n key and pick ñ.

Google Docs and Google Sheets

In a browser, the Windows methods above (Alt codes, Windows + ., US-International) all work in Google Docs and Sheets, since the browser receives the letter like any other. Google Docs also has a special characters tool on its Insert menu where you can search for “tilde.” In Google Sheets, a formula such as =UNICHAR(241) returns ñ. For other accented letters in Docs, see putting an accent over a letter in Google Docs.

On a Mac, the common route is Option + n, then n. On phones and tablets, press and hold the n key on the on-screen keyboard and slide to ñ.

When ñ won’t appear

  • Alt code types nothing or a different symbol: check that Num Lock is on and that you’re typing on the keypad, not the top row. Hold Alt for the whole code and release it only at the end.
  • Alt code works in one app but not another: some apps and games handle keyboard input their own way. Use Windows + . or copy and paste in those.
  • Windows + . doesn’t open the panel: click inside a text box first, since the panel needs a place to type. If it still fails, try Windows + ; (semicolon), which opens the same panel on many PCs.
  • Quotes and apostrophes act strangely: the US-International layout is active. Press the key and then Space, or switch layouts with Windows + Spacebar.
  • Ctrl + Shift + ~ gives nothing outside Word: that shortcut is a Word and Outlook feature. Use another method in other apps.
  • A CHAR formula shows a different character: the file may be open in Excel for Mac, where CHAR uses the Macintosh character set. UNICHAR is the safer formula.

Typing ñ on Windows

Is ñ a separate letter or just n with an accent?

In Spanish, ñ is its own letter of the alphabet, which is why swapping in a plain n changes meaning (año means year, ano does not). That’s also why many people want a reliable method rather than leaving it out.

Will names with ñ sort correctly in a spreadsheet?

Sort order follows the language and region settings in use, so ñ may land right after n or be grouped with n depending on those settings. If order matters, sort a small test list first and check the result.

Can I make a keyboard shortcut that works in every app?

Windows doesn’t include a built-in way to assign a custom key to one letter across all apps. The US-International layout is the closest built-in option, since ~ then n works everywhere once the layout is active.

Do I need to install anything?

No. Every method here uses tools already in Windows, Microsoft 365 apps or Google Docs.

If you also need French or other accented letters, the same dead key approach carries over; see typing French accents on an English keyboard for the details.