Chinese Text Cleaner (中文文本清洗)

Share:
Chinese Language & Script

Chinese Text Cleaner (中文文本清洗)

Clean pasted Chinese text and see every change

By Checked against sources by Last reviewed CHINESE LANGUAGE TEXT TOOLS
Your browser is too old for this tool’s interactive features. Please update to Safari 13.1, Chrome or Edge 80, Firefox 74 or newer.

Chinese Text Cleaner (中文文本清洗)

Text comes from

What changed

    Leave the wording alone
    Change the text, so switch on as needed
    📅 Research current as of 22 Nov 2026 · Sources: Invisible and bidi control characters: Unicode Character Database 18.0.0 (DerivedCoreProperties.txt, PropList.txt; Unicode License V3). Emoji: Unicode emoji-data.txt. Quotation marks: W3C Requirements for Chinese Text Layout, read 2 Nov 2026.
    Standards, published formulas, and reference data are revised over time — check against a current authoritative source before relying on these figures.
    Advertisement
    After results · AD-W1 Responsive

    What the tool leaves alone

    Line breaks and paragraphs, tabs, indentation, runs of spaces, spaces between Chinese characters, apostrophes and inch marks in English, numbers like 3.14 and 12:30, and the joiners that hold emoji like 👨‍💻 together all stay, unless you switch on a rule made for them. Invisible characters that the script beside them needs are kept and flagged.

    Three usual sources

    SourceWhat it does
    Web or chatOnly the rules that leave the wording alone.
    OCRAlso removes single spaces between Chinese characters, and fixes half-width punctuation after Chinese and full-width letters and digits.
    PDF line breaksAlso joins hard-wrapped lines back into sentences.

    Which invisible characters it finds

    Unicode 18.0.0 marks 4,174 code points as default-ignorable (Default_Ignorable_Code_Point): characters that normally show nothing. 405 of them are assigned. The tool reports every one it finds, by name and code point. The table lists the 49 that are neither variation selectors nor tag characters, and what the tool does with each by default; the 12 bidi controls (Bidi_Control) are among them, marked. The 260 variation selectors stay, because they choose a glyph, as in emoji and some Chinese characters. The 96 tag characters stay inside an emoji flag and go anywhere else, and an unassigned default-ignorable code point goes. Between two Chinese characters, all 49 are removed, unless the line has right-to-left text.

    Code pointUnicode nameBy default
    U+00ADSOFT HYPHENRemoved
    U+034FCOMBINING GRAPHEME JOINERRemoved, unless beside a combining mark; then kept and flagged
    U+061CARABIC LETTER MARK bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+115FHANGUL CHOSEONG FILLERRemoved, unless beside Hangul; then kept and flagged
    U+1160HANGUL JUNGSEONG FILLERRemoved, unless beside Hangul; then kept and flagged
    U+17B4KHMER VOWEL INHERENT AQRemoved, unless beside Khmer; then kept and flagged
    U+17B5KHMER VOWEL INHERENT AARemoved, unless beside Khmer; then kept and flagged
    U+180EMONGOLIAN VOWEL SEPARATORRemoved, unless beside Mongolian; then kept and flagged
    U+200BZERO WIDTH SPACERemoved, unless beside a script written without spaces (listed below); then kept and flagged
    U+200CZERO WIDTH NON-JOINERRemoved, unless inside an emoji or beside a script listed below; then kept and flagged
    U+200DZERO WIDTH JOINERRemoved, unless inside an emoji or beside a script listed below; then kept and flagged
    U+200ELEFT-TO-RIGHT MARK bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+200FRIGHT-TO-LEFT MARK bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+202ALEFT-TO-RIGHT EMBEDDING bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+202BRIGHT-TO-LEFT EMBEDDING bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+202CPOP DIRECTIONAL FORMATTING bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+202DLEFT-TO-RIGHT OVERRIDE bidiRemoved, always
    U+202ERIGHT-TO-LEFT OVERRIDE bidiRemoved, always
    U+2060WORD JOINERRemoved
    U+2061FUNCTION APPLICATIONRemoved
    U+2062INVISIBLE TIMESRemoved
    U+2063INVISIBLE SEPARATORRemoved
    U+2064INVISIBLE PLUSRemoved
    U+2066LEFT-TO-RIGHT ISOLATE bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+2067RIGHT-TO-LEFT ISOLATE bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+2068FIRST STRONG ISOLATE bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+2069POP DIRECTIONAL ISOLATE bidiRemoved, unless its line has right-to-left text; then kept and flagged
    U+206AINHIBIT SYMMETRIC SWAPPINGRemoved
    U+206BACTIVATE SYMMETRIC SWAPPINGRemoved
    U+206CINHIBIT ARABIC FORM SHAPINGRemoved
    U+206DACTIVATE ARABIC FORM SHAPINGRemoved
    U+206ENATIONAL DIGIT SHAPESRemoved
    U+206FNOMINAL DIGIT SHAPESRemoved
    U+3164HANGUL FILLERRemoved
    U+FEFFZERO WIDTH NO-BREAK SPACERemoved
    U+FFA0HALFWIDTH HANGUL FILLERRemoved
    U+1BCA0SHORTHAND FORMAT LETTER OVERLAPRemoved, unless beside Duployan shorthand; then kept and flagged
    U+1BCA1SHORTHAND FORMAT CONTINUING OVERLAPRemoved, unless beside Duployan shorthand; then kept and flagged
    U+1BCA2SHORTHAND FORMAT DOWN STEPRemoved, unless beside Duployan shorthand; then kept and flagged
    U+1BCA3SHORTHAND FORMAT UP STEPRemoved, unless beside Duployan shorthand; then kept and flagged
    U+1D173MUSICAL SYMBOL BEGIN BEAMRemoved
    U+1D174MUSICAL SYMBOL END BEAMRemoved
    U+1D175MUSICAL SYMBOL BEGIN TIERemoved
    U+1D176MUSICAL SYMBOL END TIERemoved
    U+1D177MUSICAL SYMBOL BEGIN SLURRemoved
    U+1D178MUSICAL SYMBOL END SLURRemoved
    U+1D179MUSICAL SYMBOL BEGIN PHRASERemoved
    U+1D17AMUSICAL SYMBOL END PHRASERemoved
    U+E0001LANGUAGE TAGRemoved

    The zero width space (U+200B) stays beside: Thai, Lao, Khmer, Myanmar, Hiragana, Katakana

    The joiners (U+200C, U+200D) stay beside: Arabic, Syriac, Nko, Mandaic, Mongolian, Hanifi Rohingya, Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Tibetan, Myanmar, Khmer, Balinese, Javanese, Sundanese, Tai Tham

    Also reported: special spaces (Unicode White_Space other than the ordinary space, tab and line breaks), such as NO-BREAK SPACE U+00A0, NARROW NO-BREAK SPACE U+202F and IDEOGRAPHIC SPACE U+3000, and BRAILLE PATTERN BLANK U+2800, which shows as a blank. No rule targets them as such, but a space rule that is switched on can remove some, such as “Drop spaces at line ends”, which is on by default; the result says how many went.

    Advertisement
    After how-to · AD-W2 Responsive

    Frequently asked questions

    • The first deals only with things you cannot see, so the wording stays the same. The second changes the text, by joining sentences or removing links, so those rules start switched off.

    • When OCR has put a space between every character. The rule removes a single space between two Chinese characters, so a gap of two or more, as in a space-aligned table, stays. It would also join names written with spaces, like 张三 李四 王五, and a line of verse like 床前明月光 疑是地上霜, which is why it starts switched off.

    • Because the text beside it needs it. Unicode’s core specification (chapter 23) says the zero width space is meant for languages with no visible word spacing, such as Thai, Myanmar, Khmer and Japanese. So beside Thai, Lao, Khmer, Myanmar or Japanese kana it stays, as do the joiners in Arabic-script and Indic text such as Persian and Tamil. Each of these is listed in the result with an unticked box: tick it to remove it anyway. Joiners and selectors inside an emoji are listed too, but locked, because removing them would break the emoji apart.

    • They can make the screen show characters in a different order from the one stored, which is how the Trojan Source attack (CVE-2021-42574) hides code. Isolates can too: in Chromium, “Total 100 SGD due” with U+2067 before 100 and U+2069 after SGD displays as “Total SGD 100 due”. In a line with no right-to-left letters they have no other job, so they go. In a line with Arabic or Hebrew they may be doing real work, so they stay and are flagged, except the two overrides (U+202D, U+202E), which Unicode’s bidi algorithm (UAX #9) says “are to be avoided wherever possible, because of security concerns”.

    • A line ending in a full stop, question mark, exclamation mark, colon, semicolon, ellipsis or a closing quote or bracket stays. So does one followed by a blank or indented line. The rest join the line before.

    • A link ends at the first Chinese character, and punctuation closing the sentence stays. Names like Node.js and email addresses are not treated as links.

    • No, and neither do © and ™, unless they carry the variation selector that shows them as emoji. The tool follows Unicode’s emoji data.

    • Only a pair around Chinese changes. A straight ' or " right after a Latin letter or digit never opens a pair, and one right before a Latin letter or digit never closes one, so apostrophes and inch marks stay: John's 中文 Mary's and 身高 5'10" 和 6'2" come out as they went in. Pick “ ” or 「 」 and straight, curly and corner pairs all become that form. The mainland uses double quotes first, Taiwan corner brackets.

    • No. Everything happens in your browser.

    Sources

    Unicode Character Database 18.0.0 (Unicode License V3): DerivedCoreProperties.txt (Default_Ignorable_Code_Point), PropList.txt (Bidi_Control, White_Space, Variation_Selector), UnicodeData.txt (names), Scripts.txt, DerivedBidiClass.txt and DerivedGeneralCategory.txt; the tool’s list is built from these files. The Unicode Standard 18.0, chapter 23. Nicholas Boucher and Ross Anderson, Trojan Source: Invisible Vulnerabilities (arXiv:2111.00169, 2021); NVD, CVE-2021-42574. UAX #9, Unicode Bidirectional Algorithm, revision 52. Unicode emoji data (emoji-data.txt, emoji-variation-sequences.txt). W3C Requirements for Chinese Text Layout (clreq) on quotation marks.

    Method & sources

    How it computes

    Each rule is a fixed text transformation that counts what it changed, and the page lists those counts. Rules work inside a line unless their purpose is lines, and tabs are never treated as spaces. Invisible characters follow Unicode 18.0 (Default_Ignorable_Code_Point, Bidi_Control): each one found is listed by name and code point, and one the script beside it needs is kept. Emoji follow Unicode's emoji data; quotes change only when a pair encloses Chinese. Nothing is sent anywhere.

    What this tool implements

    • Cut as false: the description of these rules as free of side effects, and the advice to enable everything for PDF text.
    • Rules that change the wording start switched off, and every change is counted and listed for the reader.

    Sources

    • Unicode Consortium. emoji-data.txt: Emoji_Presentation, the list that decides what counts as an emoji. https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
    • W3C. Requirements for Chinese Text Layout (clreq), read 2 Nov 2026: first-level quotation marks on the mainland and in Taiwan and Hong Kong. https://www.w3.org/TR/clreq/
    • Unicode Consortium. Unicode Character Database 18.0.0 (Unicode License V3): DerivedCoreProperties.txt (Default_Ignorable_Code_Point), PropList.txt (Bidi_Control, White_Space, Variation_Selector), UnicodeData.txt, Scripts.txt, extracted/DerivedBidiClass.txt and extracted/DerivedGeneralCategory.txt. The list the page reports from is built from these files. Read raw 2026-11-22: https://www.unicode.org/Public/18.0.0/ucd/
    • Unicode Consortium. Unicode emoji data 18.0.0 (Unicode License V3): emoji-data.txt (Emoji_Presentation, Extended_Pictographic) and emoji-variation-sequences.txt (emoji style sequences). Read raw 2026-11-22: https://www.unicode.org/Public/18.0.0/ucd/emoji/
    • Nicholas Boucher and Ross Anderson. Trojan Source: Invisible Vulnerabilities. arXiv:2111.00169, 2021. https://arxiv.org/abs/2111.00169
    • NIST National Vulnerability Database. CVE-2021-42574 (Trojan Source, bidirectional control characters). https://nvd.nist.gov/vuln/detail/CVE-2021-42574
    • The Unicode Standard, Version 18.0, Chapter 23, Zero Width Space: zero-width space characters "are intended to be used in languages that have no visible word spacing to represent word break or line break opportunities, such as Thai, Myanmar, Khmer, and Japanese." Read raw 2026-11-22: https://www.unicode.org/versions/Unicode18.0.0/core-spec/chapter-23/
    • Unicode Standard Annex #9, Unicode Bidirectional Algorithm, revision 52 (2026-09-01): the explicit directional overrides "are to be avoided wherever possible, because of security concerns." https://www.unicode.org/reports/tr9/tr9-52.html
    Advertisement
    Pre-footer · AD-W3 728 × 90