How to type a backtick on a Mac

Type the backtick (`), sometimes called a back or backwards apostrophe, on any Mac keyboard layout, avoid look-alike characters, and confirm you got the right one.

The backtick (`) is the character many people call a back apostrophe or backwards apostrophe. Its formal Unicode name is GRAVE ACCENT, code point U+0060. It is a straight, slanted mark used in Markdown and chat apps to format code, in shell scripts, in SQL identifiers and in many programming languages. On most US Mac keyboards it takes a single key press. On other layouts it can take a little more work, and several look-alike characters are easy to type by mistake.

What the backtick does in your text

Typing a backtick inserts one character, U+0060, at the cursor. It does not change surrounding text on its own. Some apps react to it, though. Markdown editors and many chat or note apps treat text wrapped in backticks as inline code. The Terminal treats backticks as command substitution inside double quotes or unquoted text. If the character seems to vanish or your formatting changes after you type it, the app is usually interpreting the backtick rather than displaying it.

The backtick is easy to confuse with these characters:

Character | Name | Unicode | Typical Mac input (US layout)
` | Grave accent (backtick) | U+0060 | Key left of 1
' | Apostrophe (straight) | U+0027 | Key left of Return
‘ | Left single quotation mark | U+2018 | Option + ]
’ | Right single quotation mark (curly apostrophe) | U+2019 | Option + Shift + ]
´ | Acute accent | U+00B4 | Option + Shift + E

If you were searching for a "backwards apostrophe" to use as an opening curly quote in prose, you probably want the left single quotation mark (‘), not the backtick. If you need it for code or Markdown, you want the backtick.

Type a backtick on a US Mac keyboard

  • 1. Find the key in the top-left corner of the keyboard, directly left of the 1 key and below Esc. It shows ` and ~.
  • 2. Press it on its own, without Shift, to type `.
  • 3. Press Shift with the same key if you want a tilde (~) instead.
  • 4. Don't hold Command while pressing it. Command + ` is a system shortcut that switches between windows of the same app.

On the standard US layout, the backtick key is not a dead key, so the character appears immediately. A dead key waits for the next key press before producing a character.

Type a backtick on other keyboard layouts

Key positions depend on both the physical keyboard (ANSI or ISO shape) and the input source selected in macOS. On many ISO-shaped Mac keyboards, the key left of 1 shows § and ±, and the ` ~ key sits next to the left Shift key instead. On several European input sources, the backtick is a dead key, sometimes reached with Shift or Option. Check your keyboard's printed legends, or use the Keyboard Viewer method below to see your exact layout.

  • 1. Press the key that produces the grave accent on your layout.
  • 2. If nothing appears yet, the key is a dead key. Press Space once to get a bare backtick (`).
  • 3. If you press a vowel instead of Space, you will get an accented letter such as à or è rather than a backtick.

This guide does not cover the exact key for every national layout. If none of the methods above match your keyboard, use one of the methods that work on any layout.

Methods that work on any layout

Keyboard Viewer: find the key on your layout

  • 1. Open System Settings, go to Keyboard, and turn on the option to show input menu in the menu bar (wording varies slightly by macOS version).
  • 2. Click the input menu in the menu bar and choose Show Keyboard Viewer.
  • 3. Look for the ` symbol on the on-screen keyboard. Hold Shift or Option to see characters on modified layers. Dead keys are usually highlighted when you hold Option.
  • 4. Click the key in the viewer, or press the matching physical key.

Character Viewer: insert it by name

  • 1. Place the cursor where you want the backtick.
  • 2. Press Control + Command + Space, or press the Globe (fn) key + E on keyboards that support it, to open the Emoji & Symbols viewer.
  • 3. If you see only emoji, expand the viewer to the full Character Viewer using the button in its corner.
  • 4. Search for "grave accent".
  • 5. Double-click the plain ` (U+0060) result. Avoid the combining grave accent (U+0300) and modifier letter grave accent (U+02CB), which look similar but are different characters.

Unicode Hex Input: type the code point

  • 1. In System Settings, go to Keyboard, then Input Sources, and add Unicode Hex Input.
  • 2. Switch to Unicode Hex Input from the input menu.
  • 3. Hold Option and type 0060, then release Option. A backtick appears.
  • 4. Switch back to your normal input source when you're done.

Example: backticks versus apostrophes in Markdown

Illustrative example. Only the version with real backticks is treated as inline code by Markdown renderers:

Before (straight apostrophes, not code):  Run 'ls -la' to list files.
Before (curly quotes, not code):          Run ‘ls -la’ to list files.
After  (backticks, renders as code):      Run `ls -la` to list files.

If your app's smart quotes feature turns straight apostrophes into curly ones, that change does not create backticks. You still need to type the ` character itself.

Check that you typed the right character

Similar-looking marks can break code, so it's worth confirming the code point when it matters.

  • In the Character Viewer: select the character in your document, copy it, paste it into the viewer's search field, and read the name. It should say GRAVE ACCENT, U+0060.
  • In Terminal: paste the character between single quotes in the command below. Single quotes stop the shell from treating the backtick as command substitution.
printf '%s' '`' | xxd

A correct backtick is the single byte 60 in hexadecimal. If you see e2 80 98 or e2 80 99 instead, you have a curly quotation mark (U+2018 or U+2019). If you see 27, you have a straight apostrophe.

Undo unwanted changes

  • If an app converts or reformats text right after you type, press Command + Z once. In many Mac apps this reverts the automatic substitution and keeps the character you typed.
  • To stop automatic quote changes in apps that use the macOS text system, open Edit, then Substitutions, and turn off Smart Quotes. A system-wide setting is in System Settings under Keyboard, in the text input options.
  • If a chat or note app turns backticks into code formatting when you wanted a literal backtick, check that app's formatting settings or escape rules. Behavior varies by app and isn't covered here.
  • In the Terminal, wrap literal backticks in single quotes, or escape them with a backslash (`), so the shell doesn't try to run a command.