You have a list of names, products or addresses copied from a web page, an email or a PDF, and you want it in a spreadsheet. You paste it in, import it, and then the strange failures start. Two rows that look identical refuse to count as duplicates. A lookup misses a value that is visibly right there. Sorting puts near-identical entries in different places. The usual cause is not the spreadsheet. It is the invisible mess the text carried in with it: padded lines, doubled spaces, curly quotes, stacked blank lines and characters you cannot see at all.

This guide shows how to prepare that text before the import, using the free Text Cleaner on Ovatly. It also states the honest limit of the step: cleaning tidies each line, and that is all it does. Turning lines into columns is a separate job, and no amount of cleaning replaces it.

Contents

  • Quick answer
  • Why messy text breaks imports
  • The six cleanups, and what each one fixes
  • What cleaning cannot do
  • How to prepare text for import, step by step
  • Worked example: a supplier list, before and after
  • Limitations and alternatives
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Before importing pasted text into a spreadsheet, run it through the Text Cleaner: tick line trimming, space collapsing, blank line removal, HTML stripping, quote normalization and zero-width removal, then compare the character count before and after so you can see what came out. Copy the cleaned text into your import. The cleaner never rewords anything, but it also never splits columns or adds delimiters, so do the structuring step afterwards in the spreadsheet itself.

Why messy text breaks imports

A spreadsheet treats every value as an exact string of characters. To you, "Hilltop Cafe" with two leading spaces and "Hilltop Cafe" without them are the same entry. To the spreadsheet they are different values, so they sort apart, deduplicate badly and fail to match in lookups. The same goes for a name wrapped in curly quotes instead of straight ones, or a word carrying an invisible zero-width character copied from a web page: identical on screen, different underneath.

Imports fail quietly because of this. Nothing announces that a value has trailing spaces; the row just never matches. Cleaning the text first removes the whole class of problems in one pass, before the data spreads into columns where each fault is harder to find.

The six cleanups, and what each one fixes

The Text Cleaner offers six cleanups, and you tick only the ones you want:

  • Line trimming removes spaces padded around each line, the classic leftover from PDFs and fixed-width exports. Leading and trailing spaces are the single most common cause of values that look equal but are not.
  • Space collapsing squeezes runs of spaces and tabs inside a line down to single spaces. It affects spaces and tabs inside lines only, never the line breaks themselves.
  • Blank line removal clears the stacks of empty lines that pasted text collects, so an empty row does not land in the middle of your data.
  • HTML stripping removes pasted tags while keeping the text between them, which is what you want when the source was a web page. Entities such as & are not decoded, so check for those by eye afterwards.
  • Quote normalization turns curly quotes into straight ones, and also turns long dashes into simple hyphens, which suits plain-text targets like CSV files where smart punctuation causes mismatches.
  • Zero-width removal deletes invisible characters that ride along from web pages and documents. They make two identical-looking words compare as different in searches, lookups and duplicate checks.

What cleaning cannot do

Be clear about the boundary, because expecting more than this is how imports still go wrong. The cleaner works on each line as a whole. It does not split a line into fields, it does not insert commas, tabs or any other delimiter, and it does not guess which part of a line is the name and which is the city. If your pasted text is one value per line, cleaning is the whole preparation. If each line holds several values run together, you still need a structuring step afterwards: paste the cleaned lines into the spreadsheet and use its own text-to-columns step, or fix the source export so it arrives delimited in the first place.

How to prepare text for import, step by step

  1. Open the Text Cleaner and paste the messy text in the box.
  2. Tick the cleanups to apply. For spreadsheet preparation, line trimming, space collapsing, blank line removal, quote normalization and zero-width removal are the usual set; add HTML stripping when the source was a web page or an email in HTML.
  3. Compare the character counts before and after. A drop confirms the padding, blank lines and invisible characters that came out; if the count does not move, the text was already clean.
  4. Copy or download the cleaned text and import it, then do any column splitting as a separate step in the spreadsheet.

Worked example: a supplier list, before and after

Say a supplier list copied from a web page arrives like this, with padded lines, doubled spaces, curly quotes and a stack of blank lines:

  “Green  Valley  Bakery”  
   “Riverside   Books”



  “Hilltop  Cafe”   

With trim, collapse spaces, remove blank lines and normalize quotes ticked, the result is:

"Green Valley Bakery"
"Riverside Books"

"Hilltop Cafe"

The character count tells the story: 74 characters before, 55 after, so 19 characters of padding, extra spacing and blank lines came out, and not one letter of the actual names changed. Each line is now exactly the value it appears to be, so once these lines are in the sheet they will sort together, match in lookups and deduplicate correctly.

Limitations and alternatives

The cleaner handles the text you paste, one batch at a time, and it cannot repair meaning: a misspelled name stays misspelled, and two genuinely different spellings of the same supplier stay different. It also cannot help if the mess is structural rather than cosmetic, for example values already split across the wrong columns by an earlier import; that has to be fixed in the sheet. If the source system can export a proper CSV, that beats any cleanup routine: ask for the export first, and treat cleaning as the fallback for text that only exists as a paste. For text copied out of paginated documents, where the problem is a line break at the end of every visual line rather than padding and stray characters, the right preparation is a different one: join the wrapped lines first, then clean.

Common mistakes

  • Importing first and cleaning later. Once values are scattered across columns, the same fix takes far longer. Clean while the text is still one block.
  • Ticking every cleanup blindly. If your data legitimately contains blank lines as separators between groups, blank line removal will merge the groups. Tick what the import actually needs.
  • Assuming identical-looking means identical. If a lookup still fails after cleaning, suspect a character the cleanups do not cover, such as a non-breaking space, and inspect the value character by character.
  • Expecting columns from a cleaner. Cleaned lines are still lines. Forgetting the separate structuring step is the most common reason a "cleaned" import still lands in one column.

FAQs

What are zero-width characters and why do they matter for imports? They are invisible characters copied from web pages and documents. They make two identical-looking values compare as different, so lookups and duplicate checks fail. Removing them makes text behave as it looks.

Will cleaning change my wording or values? No cleanup here rewords anything. Only spacing, blank lines, tags, quote style and invisible characters are touched, and only the ones you tick.

Can the Text Cleaner split my text into spreadsheet columns? No. It tidies each line as a whole. Splitting a line into columns, or adding commas or tabs between fields, is a separate step you do in the spreadsheet or with another tool.

Does stripping HTML decode entities like &? No. Stripping removes the tags only; the text between tags stays, and HTML entities are not decoded.

Is my text uploaded? No. Cleaning happens in your browser on your device.

Conclusion

Most broken imports are not spreadsheet problems; they are paste problems that travelled in with the text. A two-minute pass through the Text Cleaner before the import removes the padding, stray spaces, blank lines, tags and invisible characters that make values misbehave, and the before and after character count proves what came out. Keep the structuring step separate and deliberate, and the import that follows is boring in the best way. For more text preparation guides, see the Text and Writing Tools guides.

Related guide: How to Fix Text That Pasted as One Line Per Word.