Smart quotes vs. dumb quotes

Curly opening and closing marks belong in finished prose; straight typewriter marks belong in code and plain-text data.

why are my quotation marks straightmake the quotes curlquotes look like little stickssmart qoutes vs dumb quotescurly quotation marksword keeps changing my quote marks and I want it to stopstraight apostrophe in my websitethe apostrophe is facing the wrong wayhow do I get the fancy quotes on my site

See it

Live demo coming soon

What it is

Smart quotes have separate opening and closing shapes that curl into the quoted words. Dumb quotes are the straight ASCII marks inherited from typewriters and early computers: U+0022 for double quotes and U+0027 for the apostrophe. Typeset prose wants the smart pair; source code and machine-readable data usually want the straight marks. Properly typeset measurements use prime marks, though plain text often substitutes straight quotes.

Reach for smart quotes in articles, books, marketing pages, captions, and any finished English prose. A CMS or publishing pipeline should convert them by context, choosing U+201C and U+201D for double quotes and U+2018 and U+2019 for single quotes and apostrophes. That context matters: the apostrophe in a contraction is a closing single quote, not an opening one. Microsoft Word does this in the background through the AutoFormat option named Straight quotes with smart quotes, and on the web John Gruber's SmartyPants has been the reference implementation since 2003.

The gotcha is blind search and replace. Straight marks also delimit strings in code, stand for feet and inches, and appear inside URLs and identifiers. Convert prose nodes only, preserve code and preformatted text, and use the quotation conventions of the document's language instead of assuming English shapes belong everywhere: German prose opens low and closes high, and French uses guillemets with spaces inside them.

Ask AI for it

Add English smart-quote conversion to this publishing pipeline using the SmartyPants algorithm. Convert contextual double quotes to Unicode U+201C and U+201D, and single quotes or apostrophes to U+2018 and U+2019. Process rendered prose only. Skip code, pre, kbd, samp, URLs, file names, and existing HTML entities. Preserve U+0022 and U+0027 in source-code examples, and preserve prime marks used for feet and inches. Add fixtures for nested quotations, contractions, abbreviated years, and a quoted phrase beside punctuation.

You might have meant

ligatureopentype featurescharacter encodingbody copyplain language

Go deeper