CJK Text Spacing

Overview

The text spacing tool automatically inserts spaces between Chinese and English text, numbers, and Latin characters following the "Pangu spacing" convention. Paste mixed Chinese-English text into the input box for real-time processing, or upload a TXT file to process an entire document at once.

What Gets a Space Inserted

The tool adds a space at every Chinese-Latin and Chinese-number boundary:

  • Chinese next to an English letter: 你好world你好 world
  • Chinese next to a number: 版本3.0版本 3.0
  • English letter next to Chinese: React组件React 组件
  • Number next to Chinese: 100倍100 倍

Spaces that already exist are not duplicated. Punctuation, line breaks, and paragraph structure are left unchanged.

Code Blocks Will Be Modified Too

The tool processes every character in the input, including text inside inline code spans and Markdown code fences. If your document contains code samples with Chinese comments or variable names next to Latin letters, those will also get spaces inserted, which may break the code's appearance.

For technical documents mixing prose and code: extract the code blocks first, run the tool on the prose only, then merge the results back.

Uploading a TXT File

After uploading a file the tool reads all contents and outputs the processed text immediately. You can copy the result directly or download it as a new TXT file. This path is useful for bulk cleanup: database export fields, scraped article text, or batches of translated drafts all process in a single pass.