Skip to content
UniKit

Chinese text typesetter

One-click Chinese typography: space between CJK and Latin, half-width to full-width punctuation, whitespace and blank-line cleanup, optional paragraph indent and HTML output — all local.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Article text

Blank lines separate paragraphs and wrapped lines inside a paragraph are merged; repeated spaces, tabs and ideographic spaces collapse into one.

Typesetting rules

Typeset text

Whitespace is collapsed, punctuation is deduplicated and converted first, then spaces are inserted at CJK/Latin boundaries; decimal points and domain names are left intact.

Paste an article to see the typeset result

What this tool does

  • Clean up mixed Chinese/Latin text and half-width punctuation into standard Chinese typography before publishing
  • Tidy text copied out of Word, OCR output or PDFs: collapse stray spaces and join wrapped lines
  • Produce `<p>` paragraph HTML when pasting into a web editor

Example

Input

购买iPhone15后,请阅读用户手册!!

第2段:更多细节见example.com

Output

购买 iPhone15 后,请阅读用户手册!

第 2 段:更多细节见 example.com

All default rules enabled: spaces between CJK and Latin/digits, half-width to full-width punctuation, duplicate punctuation collapsed, blank-line paragraphs.

Frequently asked questions

What exactly does it do?

Six things: (1) tabs, repeated spaces and ideographic spaces collapse into one ASCII space and lines are trimmed; (2) a space is inserted between CJK and Latin letters; (3) likewise between CJK and digits (optional); (4) half-width , . : ; ! ? ( ) become full-width in Chinese context; (5) repeated punctuation is collapsed to one; (6) blank lines define paragraphs while wrapped lines inside a paragraph are joined. Each rule can be switched off.

Can it break decimals, domain names or English sentences?

No. A period only becomes 。 when the previous character is CJK and the next is CJK or end of text, so 3.14, example.com and report.txt stay intact. Commas, colons and friends are converted only when a Chinese character is directly adjacent, and pure English sentences such as "Hello world, this is fine." are untouched. Existing spaces between CJK and Latin are never duplicated.

What happens to spaces around full-width punctuation?

A space between CJK and a full-width punctuation mark is removed, so 测试 , 一下 becomes 测试,一下 and 手册! 谢谢 becomes 手册!谢谢. If the reviewer needs a space after full-width punctuation to separate an English word, it is kept.

What does the HTML output look like?

HTML mode wraps every paragraph in `<p>…</p>` and escapes `<`, `>` and `&`, separating paragraphs with a newline. It adds no inline styles, builds no lists and does not keep HTML tags from the source, so you can style the pasted result in a rich-text editor.

Keywords:Chinese typographytext formatteroffline

Related tools