How to type a backtick or backward apostrophe

Find the backtick key on Windows, Mac, Linux and mobile, type the curly opening quote instead when you need it, and check which character you actually got.

When people search for a “backwards apostrophe” on their keyboard, they usually want one of two different characters. The first is the backtick (`), also called the grave accent or backquote, which is used in code, Markdown and shell commands. The second is the opening curly single quote (‘), which looks like a mirrored apostrophe and is used in typeset text. They look similar on screen but are separate characters. Typing the wrong one can break code or look wrong in prose, so first decide which one you need.

Which character do you actually need?

Character | Common names | Unicode code point | Typical use
` | Backtick, grave accent, backquote | U+0060 | Code, Markdown inline code, shell command substitution, SQL identifiers in some databases
‘ | Left single quotation mark, opening single quote | U+2018 | Opening a quotation inside a quotation in typeset text
’ | Right single quotation mark, typographic apostrophe | U+2019 | Apostrophes in contractions and possessives, closing single quotes
' | Apostrophe, straight single quote | U+0027 | Plain-text apostrophe, string delimiters in code

Use the backtick if you are writing code, a command or Markdown formatting. Use the opening curly quote (‘) if you are writing ordinary prose and want a typographically correct opening single quote. The backtick is not a substitute for a quotation mark in prose. In code, a curly quote cannot replace a backtick or a straight quote either.

Where the backtick key is on a keyboard

On a standard US keyboard layout, the backtick has its own key in the top-left corner. The key sits directly left of the 1 key and below Esc, and it shares the key with the tilde (~). Press it without Shift to get `. Press it with Shift to get ~.

On other national layouts the key can be in a different place, and on some layouts the backtick is a secondary symbol that needs Shift, AltGr or Option. The available evidence does not cover every regional layout. If the top-left key produces a different symbol, use your operating system’s on-screen or keyboard-viewer tool to see where ` is on your active layout.

If nothing appears when you press the key: dead keys

On many international layouts, including US-International on Windows and several European layouts, the backtick key is a dead key. A dead key adds an accent to the next letter you type instead of producing a character immediately. Pressing ` and then a produces à.

  • To type a standalone backtick on a dead-key layout, press the backtick key and then press Space.
  • To get an accented letter, press the backtick key and then the vowel.
  • If you rarely need accented letters, switching to the plain US layout makes the key produce ` immediately.

Backtick shortcuts by platform

Windows

  • Keyboard key: press the key left of 1 on a US layout.
  • Alt code: turn on Num Lock, hold Alt, type 96 on the numeric keypad and release Alt. The number-row digits do not work for Alt codes.
  • Microsoft Word: type 60, then press Alt+X. Word converts the hexadecimal code into `.
  • Character Map: search for “grave accent” and copy the character.

Mac

  • Keyboard key: on US Mac keyboards the backtick is on the key left of 1. On some non-US Mac keyboards it is near the left Shift key. Check the Keyboard Viewer if you can’t find it.
  • Character Viewer: press Control+Command+Space, search for “grave accent” and double-click the result.

Linux

  • Keyboard key: on a US layout, press the key left of 1.
  • Unicode entry in many GTK and IBus-based desktops: press Ctrl+Shift+U, type 60 and press Space or Enter. Support depends on your desktop environment and input method.
  • Compose key, if enabled: the available sequences depend on your configuration.

Phones and tablets

Mobile keyboards usually put the backtick on a secondary symbols page rather than the main letters page. On some keyboards you can also long-press the apostrophe key to reveal alternative characters. Placement varies by keyboard app and version, and the supplied evidence does not confirm exact locations for specific apps. Check your keyboard’s symbol pages first.

How to type the opening curly quote (‘) instead

If you want the curly “backwards apostrophe” for prose rather than a backtick, use one of these methods:

  • Windows Alt code: hold Alt and type 0145 on the numeric keypad for ‘. Type 0146 for ’.
  • Mac (US layout): press Option+] for ‘. Press Option+Shift+] for ’.
  • Microsoft Word: type 2018 and press Alt+X for ‘. You can also press Ctrl+` and then ' to insert an opening single quote.
  • Linux (Ctrl+Shift+U method): type 2018 for ‘ or 2019 for ’.
  • Smart quotes in word processors: typing a straight ' at the start of a word is usually converted to ‘ automatically. After a letter, it usually becomes ’.

Smart-quote conversion can guess wrong. The most common error is an abbreviated year such as ’90s, where the apostrophe should point the same way as in “don’t”. The software may insert ‘ instead. When that happens, insert ’ directly with one of the methods above.

Typing backticks in web, Markdown and code

In HTML you can write the backtick as a numeric character reference, and the curly quotes as named entities:

`     backtick (`)
`   backtick (`), HTML5 named entity
‘   opening single quote (‘)
’   closing single quote / apostrophe (’)

In Markdown, single backticks mark inline code. To show a literal backtick inside inline code, wrap the code in double backticks with a space on each side. Example input:

Use ``echo `date` `` to run a nested command.

In most Markdown renderers, this displays echo date as inline code. Renderers differ, so preview the result before publishing.

Check that you typed the right character

Backticks, apostrophes and curly quotes are easy to confuse in many fonts. These are reliable ways to confirm which one you have:

  • Switch to a monospaced font, or paste the text into a code editor. In a monospaced font, the backtick usually slants clearly and the straight apostrophe is vertical.
  • In Microsoft Word, place the cursor right after the character and press Alt+X. Word replaces the character with its code: 60 for `, 2018 for ‘, 2019 for ’, 27 for '. Press Alt+X again to convert it back.
  • In a programming language, check the code point. For example, in Python:
>>> hex(ord('`'))
'0x60'
>>> hex(ord('‘'))
'0x2018'

These outputs show the expected code points for each character. Run the check on your own pasted text to confirm what it contains.

Avoid accidental changes to code and commands

Backticks carry meaning in code. In Unix shells, text wrapped in backticks is run as a command. In Markdown, backticks start and end code formatting. If a word processor, email client or chat app converts characters automatically, a command copied from it may stop working. The same happens when someone replaces backticks with curly quotes by hand.

  • Write and copy code in a plain-text or code editor, not in a word processor with smart quotes turned on.
  • If autocorrect changes a character as you type, press Ctrl+Z (Command+Z on Mac) immediately. In most word processors this undoes only the automatic conversion and keeps the character you typed.
  • To turn off conversion permanently, disable smart quotes in your application’s autocorrect or AutoFormat settings. Menu names vary by application and version.
  • Before a bulk find-and-replace between ` and ‘ or ’, save a copy of the file. Replace one match at a time in sections that contain code.

Gaps in the available evidence

This guide covers the standard US keyboard layout and widely documented shortcuts on Windows, Mac, Linux and Microsoft Word. It does not confirm backtick placement on specific regional layouts, specific mobile keyboard apps or individual laptop models, which can remap or drop keys. If a shortcut here doesn’t work on your device, use your system’s keyboard viewer, character map or Unicode entry method.