Straight and smart quotes: choosing and typing quotation characters

How straight and curly quotation marks differ, how to type each on a keyboard, and when converting between them helps or breaks your text.

A straight quotation mark and a curly (smart) quotation mark can look nearly alike, but they are different characters. Converting one to the other changes what is stored in the text, not just how it looks. That difference rarely matters in a printed paragraph, but it can decide whether a command runs, a data file parses, or a search finds a match. This guide explains what each character is, how to type it, and how to tell whether a quote conversion suits what you plan to do with the text.

The short answer

Use curly quotes for prose that people will read: articles, books, printed material and web page body text. They follow typographic convention and show where a quotation opens and closes. Use straight quotes wherever software has to interpret the text: source code, shell commands, configuration files, JSON, CSV and form fields that may be validated. Straight quotes are also safer when you cannot be sure the destination handles Unicode correctly. The deciding question is whether the text will mainly be read by people or processed by machines. If it will be both, or you do not know, plain straight quotes carry the least risk.

The characters involved

Character | Unicode name | Code point | Typical role
" | Quotation mark | U+0022 | Straight double quote; code, data, plain text
' | Apostrophe | U+0027 | Straight single quote and apostrophe; code, data, plain text
‘ | Left single quotation mark | U+2018 | Opening single quote in prose
’ | Right single quotation mark | U+2019 | Closing single quote; also the typographic apostrophe
“ | Left double quotation mark | U+201C | Opening double quote in prose
” | Right double quotation mark | U+201D | Closing double quote in prose

The two straight characters are part of basic ASCII. They are what the quote key on a standard US keyboard produces. The four curly characters sit outside ASCII and need Unicode, or an older encoding that includes them, to be stored correctly.

What converting between them actually changes

Quote conversion is character substitution. A "smart quotes" feature or converter replaces U+0022 and U+0027 with different code points, or does the reverse. Anything that compares text character by character treats the results as different strings. That includes search, spell checkers, programming languages and databases.

Converting is not symmetric. Going from curly to straight is mechanical but loses information, because the opening and closing forms collapse into one character. Going from straight to curly means the software has to guess the direction of each quote from its surroundings. Guesses commonly go wrong where an apostrophe begins a word, as in ’90s or ’til. A converter may insert an opening quote (‘) there instead of the apostrophe (’).

Some effects look like conversion but are only presentation. Certain fonts draw the straight apostrophe slanted or slightly curved, so it can look curly while the stored character is still U+0027. In HTML, the q element combined with the CSS quotes property makes the browser display quotation marks without putting them in the text. Whether those generated marks survive copying varies by browser, so do not rely on them appearing in pasted text.

Two related cases often get mixed up with quotes:

  • Measurements: feet and inches, or minutes and seconds, properly use the prime (′, U+2032) and double prime (″, U+2033). Straight quotes are a common fallback. Curly quotes are wrong here, and smart-quote features often introduce them by mistake.
  • Text reversal: a tool that reverses character order does not swap opening and closing curly quotes. Reversing “hello” produces ”olleh“, with the marks pointing the wrong way. Straight quotes have no direction, so they come through reversal unchanged.

Typing straight quotes on a keyboard

On a standard US keyboard, the key next to Enter types a straight apostrophe, and Shift plus that key types a straight double quote. If you see curly quotes appear instead, the keyboard is fine: the application or operating system is replacing the characters as you type.

  • Windows alt codes: hold Alt and type 34 on the numeric keypad for ", or 39 for '. Num Lock must be on, and the top-row number keys will not work.
  • Microsoft Word: pressing Ctrl+Z right after Word curls a quote usually reverts that one quote to straight. To stop the replacement entirely, turn off the AutoFormat As You Type option that replaces straight quotes with smart quotes.
  • macOS: the keyboard text input settings include an option to use smart quotes and dashes. Some apps have their own setting that overrides it.
  • iPhone and iPad: turning off Smart Punctuation in the keyboard settings stops automatic curling.
  • Code editors and terminals normally insert straight quotes. That is one reason pasting code into them from a word processor can cause errors.

Typing curly quotes

  • Windows alt codes (numeric keypad): Alt+0145 for ‘, Alt+0146 for ’, Alt+0147 for “, Alt+0148 for ”.
  • macOS: Option+[ for “, Option+Shift+[ for ”, Option+] for ‘, Option+Shift+] for ’.
  • Microsoft Word: type the hex code point, such as 201C, then press Alt+X to turn it into the character.
  • Many Linux desktops (GTK or IBus input): press Ctrl+Shift+U, type the hex code point, then press Enter or Space.
  • HTML: the entities “ ” ‘ ’ produce the curly forms, and " and ' produce the straight forms.

Shortcuts can differ with keyboard layout, language settings and software version. If a combination does not work, check the input method in use before assuming the method is wrong.

Will the result survive copying and sharing?

Code and data are where curly quotes break things most clearly. Programming languages, shells and data formats only recognize straight quotes as delimiters. To them, a curly quote is just another character. The first line below is invalid JSON. The second is valid.

{"name": “Ada”}
{"name": "Ada"}

In a shell, a command such as grep “error” log.txt searches for the curly marks as part of the pattern. Your quotes are not treated as quoting at all. Any time text might be pasted into a terminal, editor, spreadsheet formula or configuration file, it needs a straight-quote version.

Encoding is a second risk. If text containing curly quotes is saved as UTF-8 and then read as Windows-1252, a right single quote can show up as a garbled sequence such as ’. Straight quotes are ASCII, so they display the same under any common encoding. That makes them the safer choice for plain-text email, older systems and any destination whose encoding you cannot confirm.

Search and editing can also be affected. Some search tools and find functions treat straight and curly forms as equivalent, and others do not. A query for don't may miss don’t. Moving text through several editors can mix both styles in one document, because each program may apply its own autocorrect. Do not assume one tool's matching behavior applies everywhere. Test the specific search or find feature you depend on.

For assistive technology, how punctuation is announced depends on the screen reader and its punctuation verbosity setting. At lower verbosity, quotation marks of either style may not be spoken at all. No scoped screen reader tests were available for this article, so it makes no claim about how any particular screen reader handles straight versus curly quotes. If accessibility matters for your content, test with the screen readers your audience uses.

Straight vs curly quotes: matching the style to the use

Intended use | Better choice | Reason
Source code, commands, configuration | Straight | Syntax requires U+0022 and U+0027
JSON, CSV and other data files | Straight | Parsers only accept straight delimiters
Published prose, print, web body text | Curly | Typographic convention; opening and closing marks are distinct
Plain-text email or systems with unknown encoding | Straight | Avoids garbled characters
Text likely to be pasted into code, forms or spreadsheets later | Straight | Prevents parse and match failures
Feet, inches, minutes, seconds | Primes (straight as fallback) | Curly quotes are the wrong characters for units

Two factors can change these recommendations. If prose will be reused as data, for example as product copy fed into a template or an import file, the downstream processing matters more than appearance. Keep straight quotes in the stored source and curl them only at the display stage. If a typesetting system or publishing platform converts quotes automatically when rendering, store straight quotes and let that system handle presentation. Check first that it leaves code spans untouched.

No side-by-side tests of specific converters or smart-quote features were available for this article. Differences between tools, such as how they handle leading apostrophes or nested quotes, are untested here.

Checking a converter before you rely on it

  • Words that start with an apostrophe (’90s, ’til, rock ’n’ roll) should get ’, not ‘.
  • Nested quotes, such as single quotes inside double quotes, should open and close correctly.
  • Quotes next to dashes, parentheses or line breaks should point the right way.
  • Inline code and code blocks should be left with straight quotes.
  • Measurements such as 5'10" should not be curled.
  • Converting to curly and back to straight should reproduce your original text.

Run the same sample text through each tool you are considering and compare the results character by character. Visual inspection alone is not enough, because some fonts make the two styles hard to tell apart.