How to Type an Apostrophe on a Spanish Keyboard
Find the apostrophe key on a Spanish keyboard, avoid confusing it with the acute accent, type the curly apostrophe when needed, and check which character you actually got.
On most Spanish keyboards the apostrophe is not where English-layout users expect it, next to the Enter key. Instead it usually sits in the top row, just to the right of the 0 key, sharing that key with the question mark. This guide shows where to look, how to avoid the most common mix-up with the accent key, how to produce a typographic (curly) apostrophe when you need one, and how to confirm which character actually ended up in your text.
What the apostrophe key does for your text
Pressing the apostrophe key inserts a single character into your text. On a standard keyboard that character is the straight apostrophe, Unicode U+0027 ('). It is used for contractions and possessives in English (don't, John's), in code and data files as a string delimiter, and in some names and transliterations. A program you are typing into, such as a word processor, may then convert it automatically into the curly right single quotation mark, U+2019 (’), which is the form typographers prefer for prose.
The scope matters: the key gives you one character, but which character you end up with depends on three things — the physical keyboard, the keyboard layout selected in your operating system, and any automatic formatting in the application.
Before you start: check your layout setting
Your operating system, not the printed key caps, decides what each key produces. If a Spanish keyboard is used with the system set to an English (US) layout, or the reverse, the symbols printed on the keys will not match what appears on screen. Check the active input language or keyboard layout in your system settings (on Windows and many Linux desktops it is also shown as a short code such as ES or EN in the taskbar or panel). Make sure it matches the keyboard in front of you, for example Spanish (Spain) or Latin American Spanish.
How to type a straight apostrophe on a Spanish keyboard
- 1. Confirm the system layout is set to Spanish (Spain) or Latin American Spanish, matching your hardware.
- 2. Find the key immediately to the right of the 0 key in the top number row. On common Spanish layouts it is labeled with an apostrophe (') and a question mark (?).
- 3. Press that key on its own, without Shift, to type the apostrophe. Holding Shift gives the question mark instead.
- 4. Look at the result on screen and, if precision matters, check the character as described below.
Gap to note: no layout specification was supplied for this guide, and key positions can differ between manufacturers, laptop models and regional variants. If the key to the right of 0 is labeled differently on your keyboard, look for the key cap that shows a small vertical tick (') and use that one.
Don't confuse the apostrophe with the accent key
Spanish keyboards also have a separate key for the acute accent (´), used to write á, é, í, ó and ú. It is a dead key: pressing it shows nothing at first and waits for the next letter, which it then accents. If you press it and follow it with a space, or press it twice, many systems insert a standalone acute accent, Unicode U+00B4 (´). It looks similar to an apostrophe but is a different character, and software that searches, sorts or parses text will treat it differently.
| Character | Unicode | How it typically gets typed | Typical use |
| ' (straight apostrophe) | U+0027 | Key to the right of 0 on Spanish layouts | Code, data, plain text, contractions |
| ’ (right single quotation mark) | U+2019 | Auto-conversion in word processors, or a special input method | Typeset prose, contractions and possessives |
| ´ (acute accent) | U+00B4 | Accent dead key followed by a space | Not an apostrophe; usually typed by mistake |
Alternatives when the key doesn't work
- Windows with a numeric keypad: hold Alt, type 39 on the keypad, then release Alt to insert the straight apostrophe (').
- Windows with a numeric keypad, curly apostrophe: hold Alt and type 0146 on the keypad to insert ’.
- Microsoft Word: type 2019 and then press Alt+X to turn it into ’ (type 0027 and Alt+X for the straight form).
- Linux desktops using GTK or IBus input: press Ctrl+Shift+U, type 2019 (or 27 for the straight form), then press Space or Enter.
- Any system: switch temporarily to another layout you know, or copy the character from a character map tool.
Alt codes require the numeric keypad; the number keys in the top row do not work for this on most Windows setups. On macOS, shortcuts for the curly apostrophe depend on the selected layout, so check the Keyboard Viewer for your Spanish layout rather than relying on a shortcut written for a US keyboard.
Straight or curly: controlling automatic conversion
Word processors such as Microsoft Word and many text editors replace straight apostrophes with curly ones as you type, often called smart quotes. That is usually welcome in prose but harmful in code, spreadsheets formulas, command lines and data files, where only U+0027 works. In Word the setting is in the AutoCorrect options under AutoFormat As You Type, labeled as replacing straight quotes with smart quotes. If a conversion happens that you didn't want, pressing Ctrl+Z immediately after it usually undoes just the conversion and keeps the straight apostrophe.
Before-and-after example
Illustrative example (not tested output): the same word typed three ways. The visible difference can be very small, which is why checking matters.
Pressed the accent key + Space: John´s (U+00B4, acute accent)
Pressed the key right of 0: John's (U+0027, straight apostrophe)
After smart-quote conversion: John’s (U+2019, curly apostrophe)
How to check which character you typed
- Search for it: use your editor's Find function with a known apostrophe pasted into the search box; if your character isn't matched, it's a different one.
- In Microsoft Word: place the cursor right after the character and press Alt+X to display its Unicode code, then Alt+X again to restore it.
- In a programming environment: print the code point of the character, as in the example below.
# Example (Python 3): show the code point of each character
for ch in "John's":
print(ch, hex(ord(ch)))
# The apostrophe line should read: ' 0x27
Fixing accent marks typed in place of apostrophes
If a document already contains acute accents where apostrophes belong, a find-and-replace can fix them. Work on a copy of the file first, because a bulk replace overwrites the original characters and cannot be reversed without a backup or undo history. Limit the replacement to accents sitting between two letters, so that intentional standalone accents elsewhere are left alone.
# Example (Python 3, file read and written as UTF-8):
import re
with open("input.txt", encoding="utf-8") as f:
text = f.read()
# Replace U+00B4 only when it sits between two word characters
fixed = re.sub(r"(?<=\w)\u00B4(?=\w)", "'", text)
with open("output.txt", "w", encoding="utf-8") as f:
f.write(fixed)
This example assumes the file is UTF-8 encoded. If the file uses another encoding, such as Windows-1252, open it with that encoding instead; otherwise accented letters may be misread or the accent may not be matched. Replace "'" with "\u2019" in the pattern if you want curly apostrophes in the output. After running it, compare output.txt with the original and spot-check a few lines using the code-point check above before replacing the original file.