Short answer: straight quotes (" and ') are the plain typewriter marks — use them in code. Curly quotes (” ” and ‘ ‘) are the typographic “smart” quotes — use them in prose. Most apps auto-convert straight to curly as you type, which is great for writing and a problem for code. Copy any of them below.
Need the underlying code points, or a symbol that isn’t here? Look any character up in the Alt Code Finder.
At a glance
| Type | Marks | Unicode | Use for |
|---|---|---|---|
| Straight double / single | " ' | U+0022 / U+0027 | code, plain text, HTML attributes |
| Curly double | ” “ | U+201C / U+201D | prose, professional writing |
| Curly single + apostrophe | ‘ ‘ | U+2018 / U+2019 | prose; ‘ is the real apostrophe |
| Prime / double prime | ′ ″ | U+2032 / U+2033 | feet, inches, minutes, seconds |
What “smart quotes” are
Smart quotes — also called typographic or curly quotes — is the autoformat feature that swaps straight quotes for curly ones as you type, so a typed "hello" becomes “hello.” It’s on by default in Word, Google Docs, and on Apple devices, which is why your writing looks typeset with no effort.
The straight marks are sometimes called dumb quotes — not an insult, just the informal name for the plain, non-directional versions.
The rule: curly for prose, straight for code
- Prose (articles, books, emails, social posts): curly quotes are the professional standard.
- Code (any programming language, HTML attributes, JSON, YAML, the terminal): you must use straight quotes. Curly quotes are different characters and will cause syntax errors.
This one distinction prevents the most common quote bug — more on that below.
Not sure which you need? Use this:
| You’re writing… | Use |
|---|---|
| An article, email, or document | Curly ” ” ‘ ‘ |
| Code, a config file, or a command | Straight " ' |
An HTML attribute like class="box" | Straight " |
| Text inside HTML that users read | Curly ” ” (or “ etc.) |
| Feet and inches (5′6″) | Prime marks ′ ″ — not quotes |

How to type curly quotes
When smart quotes are off, or you’re in a plain editor, type them directly.
| Mark | Windows (Alt code) | Mac | HTML entity |
|---|---|---|---|
| “ | Alt + 0147 | Option + [ | “ |
| “ | Alt + 0148 | Shift + Option + [ | ” |
| ‘ | Alt + 0145 | Option + ] | ‘ |
| ‘ | Alt + 0146 | Shift + Option + ] | ’ |
Windows Alt codes need the numeric keypad with Num Lock on. On laptops without a numpad, copy from the boxes above instead. The right single quote ‘ doubles as the proper apostrophe (don’t, it’s).
On iPhone and iPad
Smart Punctuation is on by default, so typing ' or " produces curly marks automatically in most apps. To force a straight mark, long-press the quote key — the straight version appears as an option. Toggle the feature under Settings → General → Keyboard → Smart Punctuation.
On Android
Android has no single system-wide smart-quotes switch like iOS — conversion is handled per keyboard app, and the default Gboard does not auto-curl your quotes. To insert a curly mark, long-press the key: holding " reveals the curly double quotes (plus „ « »), and holding ' reveals the curly singles (plus ‚ ‹ ›). Slide to the one you want.
On Linux and Chromebook (Unicode input)
Use the Unicode entry method: press Ctrl + Shift + U, type the hex code, then press Enter or Space.
| Mark | Code |
|---|---|
| “ | 201C |
| “ | 201D |
| ‘ | 2018 |
| ‘ | 2019 |
This works in most text fields, but not everywhere: Google Docs often ignores it — use Insert → Special characters there instead — and some web apps and password boxes block it. If a field won’t accept the code, copy the mark from the boxes above and paste it. On many Linux desktops you can also set up a Compose key.
Turn smart quotes on or off
- Word: File → Options → Proofing → AutoCorrect Options → AutoFormat As You Type → uncheck
"Straight quotes" with "smart quotes". (The same checkbox also lives on the AutoFormat tab — clear it there too if stray curly marks persist.) - Google Docs: Tools → Preferences → Use smart quotes.
- Excel: Excel doesn’t auto-curl. Type in a cell or formula and you get straight quotes — exactly what formulas need. Curly quotes only sneak in when you paste text from Word or the web, and Excel won’t recognise them in formulas. There’s no straight-to-smart toggle like Word’s; use Find & Replace (Ctrl + H) if you ever need to swap them.
- Mac (system-wide): System Settings → Keyboard → Text Input → Edit → Use smart quotes and dashes. This governs apps that don’t have their own control; Word, Pages, TextEdit, and Mail each have their own Edit → Substitutions → Smart Quotes that overrides it.
- iPhone/iPad: Settings → General → Keyboard → Smart Punctuation.
Rule of thumb: turn it off when writing code; leave it on for everyday writing.
The classic bug: curly quotes in code
Copy a snippet out of Word, Google Docs, or a chat message into a code editor and you’ll often get curly quotes — which the compiler doesn’t recognise, throwing an error like “unexpected character” or “invalid syntax.”
The fix:
- Retype the quotes directly in your editor, or
- Disable smart quotes before writing code.
Good code editors (VS Code, Sublime, and similar) use straight quotes by default, so writing in the editor avoids the problem entirely. The bug almost always comes from pasting text that was created somewhere else.
The other common bug: an apostrophe pointing the wrong way
This one trips up writers, not coders. Autocorrect assumes an apostrophe at the start of a word is an opening quote, so it curls the wrong direction:
'90s— you want the apostrophe form ’90s, but you get an opening ’90s.rock 'n' roll— the first mark should be ‘ (apostrophe), not ‘.'twas,'em,'cause— same issue.
The fix: type a letter first, then the apostrophe, then delete the extra letter — or paste the correct ‘ (U+2019) from the copy box above. In Word you can also type two apostrophes and delete the first.
Nested quotes: a quote inside a quote
When one quotation sits inside another, alternate the styles so readers can tell them apart. Conventions vary by region and house style, but two are standard:
- US style: double outside, single inside — She said, “He called it ‘brilliant’ twice.”
- UK style: often single outside, double inside — She said, ‘He called it “brilliant” twice.’
Pick one convention and stay consistent through a document.
Don’t confuse quotes with backticks or accent marks
The backtick ` (used in Markdown and code) and the acute accent ´ are not apostrophes, even though they look close in some fonts. Typing don´t or don`t instead of don’t is a common slip, especially with certain keyboard layouts. If your apostrophe looks oddly slanted or flat, check that it isn’t one of these lookalikes.
Don’t confuse quotes with prime marks
Feet, inches, minutes, and seconds use prime marks, not quotes: 5′6″, not the quote characters. The prime ′ (U+2032) and double prime ″ (U+2033) are their own characters — type 2032 / 2033 then Alt + X in Word, or copy them from the boxes above. See the prime and double prime guide and the punctuation symbols hub.
Examples
| Context | Correct | Notes |
|---|---|---|
| Quoted speech (prose) | “Quoted speech” | curly double |
| Code | print("hello") | straight double |
| Contractions | it’s, don’t | curly single = apostrophe |
| Decades | the ’90s | apostrophe, not opening quote |
| Feet & inches | 5′6″ | prime marks, not quotes |
| HTML attribute | <div class="box"> | straight double |
Troubleshooting
| Problem | Cause & fix |
|---|---|
| Code editor shows red errors on strings | You pasted curly quotes — replace them with straight ones, or turn off smart quotes. |
| I want straight quotes but keep getting curly | Smart quotes is on; disable it using the settings above. |
| My apostrophe looks like a vertical tick | That’s the straight apostrophe; the typographic one is the right single curly quote ‘. |
| My apostrophe curves the wrong way (’90s) | Autocorrect treated it as an opening quote — see the fix above, or paste ‘. |
| My apostrophe looks slanted or flat (don´t / don`t) | You typed an acute accent or backtick, not an apostrophe. Retype with ‘ or ‘. |
| Smart quotes also changed my dashes | The same AutoFormat / Smart Punctuation setting converts -- into an en or em dash; adjust it in the same place. See the em dash and en dash guide. |
| Ctrl + Shift + U does nothing on my Chromebook | The field is blocking Unicode input (common in Google Docs, password boxes, some web apps). Use Insert → Special characters in Docs, or copy and paste the mark. |
Frequently Asked Questions
What is the difference between straight and curly quotes?
Straight quotes are the plain, non-directional marks used on typewriters and in programming. Curly quotes — also called smart or typographic quotes — are the directional marks (” ” ‘ ‘) designed for professional writing and printed text.
When should I use curly versus straight quotes?
Use curly quotes in prose, such as articles, books, emails, and other regular writing. Use straight quotes in programming code, HTML attributes, JSON, command-line terminals, and other technical contexts where exact characters matter.
How do I type curly quotes?
On Windows:
Opening double quote (“): Alt + 0147
Closing double quote (”): Alt + 0148
Opening single quote (‘): Alt + 0145
Closing single quote (’): Alt + 0146
On Mac:
Opening double quote (“): Option + [
Closing double quote (”): Shift + Option + [
Opening single quote (‘): Option + ]
Closing single quote (’): Shift + Option + ]
You can also leave Smart Quotes enabled so your word processor inserts them automatically.
How do I turn smart quotes off or on?
The setting depends on the application or device:
Microsoft Word: AutoFormat As You Type
Google Docs: Tools → Preferences
Mac: System Settings → Keyboard → Text Input
iPhone/iPad: Settings → General → Keyboard → Smart Punctuation
Why do curly quotes break my code?
Programming languages expect straight quotes. Curly quotes are different Unicode characters, so compilers and interpreters treat them as invalid syntax, often resulting in an error.
Should I use quotes for feet and inches?
No. Use the prime (′) symbol for feet and the double prime (″) symbol for inches. For example, write 5′6″ instead of using ordinary quotation marks.
Recap
Straight quotes (" ') for code; curly quotes (” ” ‘ ‘) for prose. Apps auto-convert with smart quotes — turn it off for code, on for writing. Watch the apostrophe that curls the wrong way in words like ’90s, and use prime marks (′ ″), not quotes, for feet and inches.
Written by Igor R. Tested on Windows 11, macOS, iOS, and in Microsoft 365 and Google Docs. Last updated June 2026. Code points follow the Unicode Standard.