Skip to main content

AltF Flow recipe

Clean text pasted from Word or Google Docs

Word and Google Docs add curly quotes, long dashes, ellipsis characters, non-breaking spaces and sometimes invisible zero-width characters that can break code, CMS fields and CSV imports. This recipe converts the visible ones to plain ASCII, deletes the invisible ones, collapses repeated spaces, trims each line and leaves at most one blank line between paragraphs.

  • Free, no sign-up
  • Runs in your browser
  • Nothing uploaded
  • Share recipes as a link

5 steps · runs in your browser · nothing uploaded

Pipeline

  1. Replace curly quotes, dashes and ellipses pasted from Word or Docs with plain ASCII.

    9 → 9 lines
  2. Find: [\\u200B-\\u200D\\u2060\\uFEFF\\u00AD], Regular expression

    9 → 9 lines
  3. Turn runs of spaces and tabs into a single space.

    9 → 9 lines
  4. Remove leading and trailing spaces from each line.

    9 → 9 lines
  5. Keep one between paragraphs

    9 → 6 lines (-3)

9lines26words174chars

6lines26words163chars-3 lines vs input

The 5 steps in this recipe

  1. 1

    Straighten smart quotes

    Replace curly quotes, dashes and ellipses pasted from Word or Docs with plain ASCII.

  2. 2

    Find and replace - Find: [\\u200B-\\u200D\\u2060\\uFEFF\\u00AD], Regular expression

    Replace text everywhere. Supports regular expressions with $1 back-references.

  3. 3

    Collapse repeated spaces

    Turn runs of spaces and tabs into a single space.

  4. 4

    Trim every line

    Remove leading and trailing spaces from each line.

  5. 5

    Remove empty lines - Keep one between paragraphs

    Delete blank lines, or squeeze runs of blank lines down to one so paragraphs stay apart.

Change any option in the workspace above, switch a step off to compare, or add your own steps. Save it to reuse it, or share the recipe as a link.

Worked example

Before
“Quarterly update” — draft



We’re  on track for the launch… mostly.  The​ team’s next step is testing.
   Dates: 3–5 November   


Questions? Reply to the shared docu­ment.
After
"Quarterly update" - draft

We're on track for the launch... mostly. The team's next step is testing.
Dates: 3-5 November

Questions? Reply to the shared document.

What gets replaced

  • Curly single and double quotes become ' and ".
  • En and em dashes become a hyphen, and the ellipsis character becomes three dots.
  • Non-breaking spaces become normal spaces, then runs of spaces collapse to one.
  • Zero-width spaces, joiners, word joiners, byte-order marks and soft hyphens are deleted.

When to keep typographic characters

Curly quotes and proper dashes are correct in published prose, so skip step 1 if the text is going into a well-configured CMS and you only want to remove invisible characters. Keep step 1 for code, filenames, spreadsheet imports and plain-text emails, where smart characters often show up as garbled symbols.

Clean text pasted from Word: questions and answers

Does it remove formatting like bold and links?

Pasted plain text has no formatting to remove. If you pasted HTML, use the HTML to plain text recipe instead.

Will accented letters be removed?

No. Only the listed punctuation and invisible characters change. Add Remove accents if you need plain ASCII letters too.

Why do soft hyphens matter?

They are invisible in most editors but can split search matches and appear as stray hyphens in some systems.

More recipes like this

Every step you can add (41)

Clean up

  • Trim whitespace
  • Trim every line
  • Remove empty lines
  • Collapse repeated spaces
  • Remove line breaks
  • Strip HTML tags
  • Straighten smart quotes
  • Remove accents
  • Remove punctuation
  • Remove emoji
  • Remove non-ASCII characters

Change case

  • Change case
  • Make URL slugs

Lines

  • Sort lines
  • Remove duplicate lines
  • Keep only duplicated lines
  • Compare with another list
  • Count repeated lines
  • Reverse line order
  • Shuffle lines
  • Keep a range of lines
  • Truncate long lines
  • Wrap at a width
  • Split into lines
  • Join lines

Find and filter

  • Find and replace
  • Filter lines
  • Remove words or characters

Extract

  • Extract

Data and formats

  • Format JSON
  • Minify JSON
  • CSV to JSON
  • JSON to CSV
  • Lines to JSON array
  • JSON array to lines

Encode and decode

  • Encode or decode

Build output

  • Add prefix / suffix
  • Quote each line
  • Number lines
  • Apply a line template
  • Add timestamp
What each step does, with its options

AltF Flow runs entirely in your browser. Your text is never sent to AltFTool; saved recipes stay in this browser and shared links carry the steps only.