Pangu Spacing
Automatically add spaces between Chinese and English text or digits, with every change highlighted and Markdown and code kept intact.
0 characters · 1 line
0 characters · 1 line
Changes
How to use
- Paste text that mixes Chinese and English into “Input text”, or click “Example”.
- “Result” instantly adds half-width spaces between Chinese characters and Latin letters, digits and symbols. Click “Copy” to use it.
- “Changes” shades and underlines every added space and strikes through removed characters, with a count of each above.
- For Markdown or text with code, keep “Keep Markdown and code syntax” checked so code and link URLs are left alone.
FAQ
Why add spaces between Chinese and English?
A half-width space between Chinese characters and Latin letters or digits makes word boundaries easier to see, and many Chinese style guides and technical writing guides recommend it. This tool uses the rules of the open-source pangu.js library.
What exactly does it change?
Mostly it inserts spaces between CJK characters (Chinese, Japanese kana and Bopomofo) and Latin letters, digits and half-width symbols. pangu also removes stray spaces just inside brackets and quotes, and in a few cases turns a half-width colon into a full-width one. No space is added next to full-width punctuation such as ,。「」. Note that a word followed by a bracket also gets a space, so rgb(0 0 0) in a Chinese sentence becomes rgb (0 0 0); wrap code in backticks (`) to keep it as is.
What does “Keep Markdown and code syntax” do?
Fenced code blocks (``` or ~~~) are left untouched. Inline code keeps its content, though spaces are still added around it. Link and image URLs, <https://…> autolinks and reference-definition URLs are kept as is. Bold, italic and strikethrough markers stay attached to their text instead of turning into broken syntax like “** bold”. Code blocks indented by four spaces cannot be detected reliably, so wrap code in ``` instead.
Are URLs, emails and HTML tags split up?
No. Even without the Markdown option, pangu keeps http:// and https:// URLs, email addresses and HTML tags intact and only adds spaces between them and Chinese text.
Does it work for Korean?
No. pangu only handles Chinese, Japanese kana and Bopomofo; Korean (Hangul) is left as is.
Is my data uploaded?
No. Everything runs in your browser, with no network connection needed.
Related tools
Full/Half-width Converter
Convert full-width letters, digits, punctuation and spaces to half-width or back, choosing which kinds of characters to change.Whitespace Cleaner
Trim trailing spaces, collapse blank lines and repeated spaces, remove zero-width and non-breaking spaces, convert tabs and line endings.Traditional/Simplified Chinese
Convert between Simplified and Traditional Chinese, with optional Taiwan phrases (软件 → 軟體) and Hong Kong variants.Word Counter
Count characters, Chinese characters, English words, lines, paragraphs, sentences and reading time instantly.