textscrubr
Home / Blog / Punctuation

How to Convert Smart Quotes to Straight Quotes

Punctuation2 min readUpdated 2026-06-23
To convert smart quotes to straight quotes, paste your text into a cleaner that replaces curly quotes (“ ” ‘ ’) with straight ones (" '). This fixes both double and single quotes at once. Find-and-replace works too, but you must search for each curly character separately.

Smart quotes look polished in prose and cause real problems in code and plain-text fields. Here is how to straighten them quickly.

Smart quotes vs straight quotes

The trouble starts when curly quotes end up where straight quotes belong. A curly quote in a string literal will throw a syntax error. In a CSV or config file it can break parsing. In a plain-text email field it can render oddly.

The quick fix: a cleaner

Paste your text into a tool that straightens quotes and it converts both kinds in one pass. textscrubr replaces curly double and single quotes with straight ones and, at the same time, removes the invisible characters and fixes the em dashes that usually come with the same pasted text. It leaves quotes inside code blocks alone if you are working with Markdown, so it does not change something that was meant to stay.

Find and replace

In an editor you can do it manually, but you have to handle each character:

  1. Replace and with ".
  2. Replace and with '.

Copy each curly character from your text into the search box, since you usually cannot type them directly. Miss one and you still have a stray curly quote waiting to break something.

A caution on prose

Straight quotes are correct for code and many plain-text contexts, but for published prose, curly quotes are the typographically correct choice. So convert to straight quotes when the destination needs them (code, data, config, plain fields), and keep curly quotes when you are writing for readers. A good cleaner makes this a toggle, so you decide based on where the text is going.

Scrub this text in one click

textscrubr strips the hidden characters, em dashes, and double spaces, and keeps your lists, headings, and code exactly where you put them. Free, and it runs entirely in your browser.

Clean my text free →

Frequently asked questions

Why do smart quotes break my code?

Code expects straight quotes (" and '). A curly quote is a different character, so the compiler or parser does not recognize it as a string delimiter and throws a syntax error.

How do I convert curly quotes to straight quotes fast?

Paste the text into a cleaner that straightens quotes, which converts both double and single curly quotes in one pass. Manual find-and-replace works but you must search for each curly character.

Should I always use straight quotes?

No. Straight quotes are right for code, data, and plain-text fields. For published prose, curly quotes are typographically correct. Convert based on where the text is going.