Smart Quote Converter

Convert straight quotes to curly typographic quotes or back again

Convert straight ASCII quotes and apostrophes to curly typographic quotes for polished prose, or revert curly quotes back to straight for code and data. Handles dashes and ellipses too. Runs in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What are smart quotes?

Smart or curly quotes are the typographic opening and closing marks used in printed prose, like the left and right double quotes around a sentence. Straight quotes are the single vertical ASCII marks produced by a keyboard and used in code.

Smart quotes — the curly typographic quotation marks used in published prose — look professional in body copy but cause silent failures when pasted into code, configuration files, or shell commands. This tool converts between the two in either direction, and optionally handles em dashes and ellipsis characters.

How it works

Going straight to curly, the converter decides opening versus closing from context:

“  → “ (opening) if preceded by start/space/( else “ (closing)
‘  → ‘ (opening) in the same positions, else ‘ (closing/apostrophe)
--  → — (em dash)        ...  → … (ellipsis)

Going curly to straight simply maps every curly variant back to its ASCII form, and the em dash and ellipsis back to -- and .... Apostrophes inside words, such as in don’t, always become the closing curly single quote.

Worked example

Input: ”It’s here” -- done...

Straight to curly: ”It’s here” — done…

Curly to straight (same text back): ”It’s here” -- done...

The opening double quote follows a space, so it becomes a left curly; the closing double quote follows a word character, so it becomes a right curly. The apostrophe in It’s follows a letter, so it becomes the right single quote (the typographically correct apostrophe). The double hyphen becomes an em dash, and the three dots become a single ellipsis character.

When to use each direction

Straight to curly — for blog posts, marketing copy, print design, ebooks, and any prose where typographic quality matters. Word processors do this automatically; plain-text editors and most CMS fields do not.

Curly to straight — for source code, JSON, YAML, shell scripts, CSV, SQL, and any other format parsed by software. A curly quote in a string literal causes a syntax error. A curly apostrophe in a command argument breaks the shell. The most common source of mystery parse errors in developer workflows is a code snippet copied from a documentation page or an AI response that has already “educated” the quotes.

Characters involved

ASCIIUnicode (curly)Name
Left / right double quotation marks
Left single / right single (apostrophe)
--Em dash (U+2014)
...Horizontal ellipsis (U+2026)

All conversion runs locally in your browser — no text leaves your device.

Common situations where you need this tool

Pasting documentation into code: AI assistants, word processors, and rich-text documentation platforms all insert curly quotes automatically. When you copy a code snippet, a JSON example, or a SQL query from a documentation page, the quotes may already be curly. Pasting that snippet into a terminal, editor, or deployment config then causes a cryptic parse error. Run the text through curly-to-straight first to clean it.

Blog and CMS publishing: Most CMS platforms (WordPress, Ghost, Notion exports) do not auto-educate quotes in the way a word processor does, so you may be publishing with inconsistent straight and curly quotes. Running your post draft through straight-to-curly normalises them all at once.

Technical writing and API documentation: Technical writers often draft in plain text editors for precision and speed, then need to convert to typographic quotes before publication. This is faster than manually replacing each quotation mark in a rich-text editor.

Markdown with embedded prose: Markdown itself does not care about quote style, but static site generators and rendering pipelines that use a “smart typography” plugin will convert straight quotes for you — which then causes a conflict if you have already manually used curly quotes. Running the whole file through one direction first ensures a consistent starting point.

Debugging shell script errors: A surprisingly common bug category is a shell script that contains a curly apostrophe in a comment or string literal pasted from documentation. The shell tokeniser sees it as a strange character, not an apostrophe, and the script fails. Convert curly to straight before pasting into shell scripts.