How to Type Spanish Accents and ñ on Mac, Windows and Ubuntu

Stop copying and pasting. Here are the fastest ways to type á, é, í, ó, ú, ü, ñ, ¿ and ¡ on macOS, Windows and Ubuntu, with a cheat sheet for each.

Why Accents Matter in Spanish

In Spanish, an accent mark is part of the spelling. Leave it out and you can change the word, or at least look careless. A few pairs you will meet constantly:

  • papa (potato) vs. papá (dad)
  • si (if) vs. sí (yes)
  • tu (your) vs. tú (you)
  • el (the) vs. él (he)
  • esta (this) vs. está (is)

The good news: you only need nine extra characters.

á é í ó ú  ·  ü  ·  ñ  ·  ¿ ¡

Pick your system below. If you will type Spanish every day, skip to the keyboard layout option for your system. It takes two minutes and you will never look up a shortcut again.


macOS

Fastest: press and hold

Hold down a letter key and a small menu appears. Press the number under the character you want, or click it.

  • Hold a → choose á
  • Hold e → choose é
  • Hold n → choose ñ

This works in most apps. It does not work in a few (some terminals and code editors turn it off), so learn the shortcuts below as well.

Keyboard shortcuts (US keyboard)

Press Option together with the first key, release, then type the letter. For a capital, hold Shift when you type the letter.

  • á é í ó ú: Option + E, then the vowel
  • ñ: Option + N, then n
  • ü: Option + U, then u
  • ¡: Option + 1
  • ¿: Option + Shift + /

Permanent fix: add a Spanish keyboard

  1. Open System Settings → Keyboard → Text Input → Input Sources → Edit.
  2. Click +, choose Spanish, then Add.
  3. Switch layouts from the menu bar, or with the shortcut shown in the same settings pane.

On older versions of macOS the same option is under System Preferences → Keyboard → Input Sources. The Spanish layout has dedicated keys for ñ, ¿ and ¡, and the accent key sits to the right of ñ. Note that the keys are in different places from a US keyboard, so look at the on-screen keyboard viewer until your fingers learn it.


Windows 10 and 11

Option 1: Alt codes (works everywhere, needs a number pad)

Hold Alt, type the four-digit code on the numeric keypad (Num Lock on), then release Alt. The row of numbers above the letters will not work. Laptops without a number pad cannot use this method, so go to Option 2.

  • á é í ó ú: Alt + 0225, 0233, 0237, 0243, 0250
  • Á É Í Ó Ú: Alt + 0193, 0201, 0205, 0211, 0218
  • ñ / Ñ: Alt + 0241 / 0209
  • ü / Ü: Alt + 0252 / 0220
  • ¡: Alt + 0161
  • ¿: Alt + 0191

Option 2 (recommended): US-International keyboard

This is a free layout from Microsoft. Your keys stay in the same place, and you gain accent shortcuts.

  1. Open Settings → Time & language → Language & region.
  2. Next to English (United States), open ⋯ → Language options.
  3. Choose Add a keyboard and select United States-International.
  4. Switch between keyboards any time with Win + Space.

Then type:

  • á é í ó ú: ' then the vowel (hold Shift for a capital)
  • ñ: ~ then n
  • ü: " then u
  • ¡ ¿: Right Alt + 1 and Right Alt + /

One catch: the apostrophe and quote keys now wait for the next letter. To type a plain apostrophe, press it and then Space.


Ubuntu (GNOME desktop)

Option 1: Unicode shortcut (works in most apps)

Press Ctrl + Shift + U, type the code, then press Space or Enter.

  • á é í ó ú: e1, e9, ed, f3, fa
  • Á É Í Ó Ú: c1, c9, cd, d3, da
  • ñ / Ñ: f1 / d1
  • ü / Ü: fc / dc
  • ¡ / ¿: a1 / bf

It works in GTK apps such as the text editor, Firefox and the terminal. A few other apps do not support it, so use Option 2 or 3 there.

Option 2: Set up a Compose key

Open Settings → Keyboard, find Compose Key under Special Character Entry (it may sit under Keyboard Shortcuts → Typing on some versions), and pick a key you rarely use, such as Right Alt. Then press and release the Compose key and type two characters:

  • á é í ó ú: Compose, ', vowel
  • ñ: Compose, ~, n
  • ü: Compose, ", u
  • ¡: Compose, !, !
  • ¿: Compose, ?, ?

Option 3 (permanent): an international layout with dead keys

  1. Open Settings → Keyboard → Input Sources and click +.
  2. Choose English (United States), then English (intl., with dead keys).
  3. Switch layouts with Super + Space.

It behaves like the Windows US-International layout: press ' and then a vowel to get an accented letter, ~ then n for ñ. Plain apostrophes need ' followed by Space.


Phone and Tablet (30 seconds)

On iPhone, iPad and Android, press and hold a letter on the normal keyboard and choose the accented version. Or add the Spanish keyboard in your settings and switch with the globe or language key.


Quick Comparison

  • Fastest to start: press-and-hold on Mac, Alt codes on a Windows desktop, Ctrl + Shift + U on Ubuntu.
  • Best for daily typing: a keyboard layout (Spanish on Mac, US-International on Windows, intl. with dead keys on Ubuntu).
  • Laptop with no number pad: skip Alt codes and use a layout.

How This Helps Your Spanish

Typing accents from memory forces you to notice which syllable is stressed, and that is a real part of learning to say words correctly. When you type a full chunk such as ¡Con razón! or ¿Cómo se dice…?, the accent marks, the opening ¿ and ¡ and the spelling all become part of the chunk in your memory.

The Spanish flashcards let you practice exactly this: you type the Spanish chunk, and if you only forget an accent, the answer is marked as close rather than wrong.

This post supports the Spanish Chunk Series — a growing collection of chunk patterns for natural Spanish.