Text Cleaning & Editing Tools
Free text cleaning tools: find & replace, dedupe lines, sort, strip HTML, split/join, text diff, and more.
Text Cleaning & Editing Tools Online
Tidy up text copied from emails, spreadsheets, PDFs and web pages: remove duplicates and blank lines, fix spacing, sort or number lines, strip HTML, and compare two versions. Each tool works on pasted text in your browser.
Fix messy text
- Remove Duplicate Lines: keeps the first copy of each line, optionally ignoring case.
- Remove Empty Lines: drops blank and whitespace-only lines.
- Clean Whitespace: trims each line, merges repeated spaces and removes empty lines.
- Remove Line Breaks: joins multi-line text into one line or paragraph, useful for text copied from PDFs.
- Remove Punctuation: strips Western and Chinese punctuation, with options to keep some.
- Strip HTML Tags: removes tags and decodes entities to leave plain text.
Reorganize lines
- Sort Lines: A to Z, Z to A, by length, or shuffled.
- Add Line Numbers: numbers each line in dot, parenthesis or bracket style.
- Add Prefix & Suffix: adds text to the start or end of every line.
- Split Text: splits by comma, new line, tab or a custom separator.
- Join Text: combines lines with a comma, space, semicolon or custom delimiter.
- Wrap Text: breaks long lines at a chosen width.
- Truncate Text: shortens text to a character or word limit, with an optional ellipsis.
Find and compare
- Find and Replace: plain or regex search, with case-insensitive matching.
- Common Regex Patterns: 50+ ready-made patterns for emails, URLs, phone numbers, dates and Chinese text.
- Extract URLs & Emails: pulls every link and email address out of a block of text.
- Text Diff: compares two texts line by line and highlights additions and removals.
在线文本清理与编辑工具
整理从邮件、表格、PDF 和网页里复制来的文字:去掉重复行和空行、修正空格、排序或编号、去除 HTML 标签、对比两个版本。每个工具都在浏览器里处理你粘贴的文本。
修正杂乱文本
- 去重行:每行只保留第一次出现,可以忽略大小写。
- 删除空行:删掉空白行和只有空格的行。
- 清理空白:修剪每行首尾空格、合并连续空格并删除空行。
- 去除换行:把多行文字合并成一行或一段,适合处理从 PDF 复制的文字。
- 去除标点:去除中英文标点,可以选择保留部分标点。
- 去除 HTML:去掉标签并解码实体字符,只留下纯文本。
重新组织行
- 行排序:按字母正序、倒序、长度排序,或者随机打乱。
- 添加行号:给每行编号,可选点号、括号或方括号格式。
- 添加前后缀:在每行开头或结尾加上指定文字。
- 分割文本:按逗号、换行、制表符或自定义分隔符拆分。
- 合并文本:用逗号、空格、分号或自定义符号把多行合并。
- 自动换行:在指定宽度处把长行折行。
- 截断文本:按字符数或词数截短文本,可以加省略号。
查找与对比
- 查找替换:支持普通文本或正则表达式查找,可以忽略大小写。
- 常见正则参考:50 多个现成的正则,用于邮箱、网址、电话、日期和中文等。
- 提取 URL 和邮箱:从一段文字里提取所有网址和邮箱地址。
- 文本对比:逐行对比两段文本,标出增加和删除的内容。
Recommended 3-Step Pipeline for Messy Copy-Pasted Text
When cleaning text copied from PDFs, spreadsheets, or scraped HTML, run operations in order: (1) Strip HTML or Remove Invisible Characters, (2) Clean Whitespace and Remove Empty Lines, and (3) Remove Duplicate Lines. Read our full walkthrough: Cleaning Messy CSV, Markdown & Unicode Text.
Frequently Asked Questions
- Do all text cleaning tools on myonlinetext.top run locally?
- Yes. Every tool runs 100% client-side in your browser with zero file uploads or server logging.
- Which tool fixes weird spacing copied from PDFs?
- Start with Remove Line Breaks and Clean Whitespace to collapse broken hard wraps and double spaces instantly.
- Can I clean sensitive customer or internal log snippets safely here?
- Yes. Because no text leaves your device, internal logs and CSV rows remain strictly private.