T

Text Machine

Powerful text tools, in your browser

Replace Smart Quotes

Convert curly "smart" quotes to straight quotes.

Input

How to use Replace Smart Quotes

  1. 1

    Paste your text

    Paste text that contains curly 'smart' quotes copied from Word, Google Docs, or a webpage into the input box.

  2. 2

    Replace the quotes

    Click 'Replace Quotes' to convert all typographic quotation marks to plain straight quotes.

  3. 3

    Review the output

    Check the output box, where curly double and single quotes have been swapped for straight " and ' characters.

  4. 4

    Copy the clean text

    Use 'Copy Output' to paste the corrected text into code, a terminal, or any plain-text environment.

Why Smart Quotes Break Things, and How to Fix Them

Straight quotes vs. smart quotes

There are two families of quotation marks. Straight quotes are the plain ASCII characters: the straight double quote and the straight apostrophe sit right on your keyboard. Smart quotes, also called curly or typographic quotes, are the angled left and right marks that look polished in print, with distinct opening and closing shapes for both double and single quotes.

Smart quotes are beautiful in a finished document and genuinely wrong almost everywhere else. This tool converts the curly characters back to their straight ASCII equivalents, so text that was styled for reading becomes text that machines can parse.

Where smart quotes come from

You rarely type smart quotes on purpose. Word processors and editors insert them automatically through a feature called autocorrect or smart quotes, silently swapping your straight keystrokes for curly ones as you type. Microsoft Word, Google Docs, Apple Pages, and many content management systems all do this by default.

The trouble starts when you copy that text out and paste it somewhere unforgiving. The characters look almost identical on screen, so the curly marks ride along invisibly into your code editor, terminal, or spreadsheet, and only reveal themselves when something downstream refuses to work.

Exactly what breaks

Programming languages expect straight quotes to delimit strings. Paste a line like print(“hello”) with curly quotes and the interpreter throws a syntax error, because it does not recognize the typographic characters as string delimiters. The same failure hits JSON, where only straight double quotes are valid, so a curly quote makes the entire document fail to parse.

CSV files mis-split columns when a stray curly quote confuses the parser, command-line tools misread flags and arguments, and URLs and config files behave unpredictably. In every case the fix is identical: replace the curly characters with straight ones, which is exactly what this tool does in a single click.

The specific characters involved

Four curly characters cause nearly all the pain. The left and right double quotation marks both collapse to the single straight double quote. The left and right single quotation marks, the second of which also serves as the typographic apostrophe, both collapse to the straight single quote, the plain apostrophe.

Knowing the mapping helps you recognize the problem in the wild. If you see angled quotes hugging your strings or a slanted apostrophe inside a contraction, those are the characters to convert. This tool targets exactly these quotation marks and leaves everything else untouched.

A worked example

Start with a sentence copied from a document: She said, “it’s ready,” and left. The opening and closing double quotes are curly, and the apostrophe in “it’s” is curly too. After conversion you get: She said, "it's ready," and left. The double quotes are now straight, and the contraction uses a straight apostrophe.

That converted version is what a programming language, a JSON validator, or a CSV importer will accept without complaint. The wording, spacing, and line breaks are all preserved; only the four quote characters changed, which is the minimal edit needed to restore compatibility.

Who needs this most

Developers are the heaviest users: pasting a code snippet from a blog, a chat message, or a design doc and hitting a baffling syntax error is a daily ritual, and curly quotes are a frequent culprit. Running the snippet through this converter first eliminates that entire class of bug.

Data analysts and engineers benefit just as much when cleaning CSV and JSON exported from office tools, as do anyone preparing plain-text configuration, scripts, or API payloads. If your source touches Word or Docs and your destination is code or data, convert the quotes as a routine first step.

Tips and what stays the same

Make quote conversion the first thing you do after pasting from a rich-text source, before you try to run, parse, or import the text. Catching the problem up front is far easier than debugging an error message that does not mention quotes at all, because the characters are nearly invisible to the eye.

Remember the tool changes only the curly quotation marks. Everything else, including line breaks, spacing, and other punctuation, is left exactly as it was. If you also need to normalize other typographic characters such as dashes or ellipses, handle those separately, since this converter is focused specifically on quotes and apostrophes.

Frequently asked questions

What are smart quotes and why replace them?
Smart (curly) quotes are the angled “” and ‘’ characters that word processors insert automatically. They break code, JSON, CSV, and command-line input, so converting them to straight quotes restores compatibility with plain-text tools.
Does it convert both double and single curly quotes?
Yes. The tool replaces curly double quotes (“ ”) with the straight double quote (") and curly single quotes and apostrophes (‘ ’) with the straight single quote (').
Will it change anything other than the quotation marks?
No. Only the curly quote characters are swapped for straight ones. The rest of your text, including line breaks, spacing, and other punctuation, is left untouched.
Can it fix apostrophes in contractions like 'don’t'?
Yes. A curly apostrophe in words like “don’t” or “it’s” is converted to a straight apostrophe, which is exactly what code and data formats expect.
Is the tool free and private?
It is completely free with no registration, and all replacement happens in your browser, so your text is never uploaded or stored anywhere.

Related tools

Keep going with these handy tools

Case Converter

Find and Replace Text

Bionic Reading

Capitalize First Letter

Capitalize Each Word

Title Capitalization Tool