Auto-spacing between Chinese and English text with CSS

Part of Beginner writer growth log Collection

Documenting my journey from zero to writer, including building a blog, managing social media, finding my voice, and all the struggles and growth along the way.

2 min read

When you write Chinese, there’s a common practice of manually inserting spaces between Chinese characters and English words or numbers. It makes the text easier to read. Compare:

  • 這個很beautiful的book讓me感到很happy。
  • 這個很 beautiful 的 book 讓 me 感到很 happy。

I picked up this habit from reading Wiwi’s blog. He once wrote that text without these spaces makes him slightly uncomfortable.

After a while though, I got uncomfortable too. For a different reason.

Here are some examples from my own blog:

What I can’t accept is: the space is too wide.

Every manual space feels like an unnecessary pause, an unintended emphasis. It’s especially noticeable when English words or numbers are sandwiched between Chinese characters.

And manual spacing has some annoying problems:

  • Inconsistency. My personal notes have no spaces. My blog does. When publishing a book, the publisher strips them all out anyway.
  • You will miss some. When writing posts and my newsletter, if I’m too lazy to ask AI to fix the spacing, I do it manually. I always miss a few.
  • It’s not your job. Spacing is software’s responsibility, not mine or my markdown’s.

My book editor also wrote about this (in Chinese): the publishing industry has always stripped author-inserted spaces and handled spacing through typesetting.

This problem should be solved by software, not by writers.

The new CSS feature: text-autospace

Yesterday I finally got fed up and started asking AI for help. What I wanted was simple: no manual spaces in the text, let CSS or JS handle it automatically, and the gap should be smaller than a half-width space.

Turns out I asked at the right time.

CSS has a new property called text-autospace that shipped as a baseline feature in November 2025. As of April 2026, all major browsers support it. It inserts roughly 1/8 em of spacing between CJK ideographs and Latin/numeric characters. Much smaller than a manual space. Just right.

And it’s dead simple. Just add text-autospace: normal to your CSS!

Here’s the comparison:

沒有空格

2026年4月9日

約4分鐘

新手Youtuber

去健身房聽Podcast

HP太低要回城補血

理想的日常:過好每天的1440分鐘

手動加入空格

2026 年 4 月 9 日

約 4 分鐘

新手 Youtuber

去健身房聽 Podcast

HP 太低要回城補血

理想的日常:過好每天的 1440 分鐘

CSS text-autospace ✓

2026年4月9日

約4分鐘

新手Youtuber

去健身房聽Podcast

HP太低要回城補血

理想的日常:過好每天的1440分鐘

So much better, right!?

One small regret

Unfortunately, changing my own blog can’t influence RSS readers.

Most RSS readers don’t support text-autospace yet. But that’s also a problem for software to solve!

My RSS reader of choice, NetNewsWire, happens to be open source. So I submitted a PR. No idea if it’ll be accepted, but at least I tried.

One funny thing I noticed while writing this post: I’ve already internalized the habit of manually inserting spaces.

Now I have to unlearn it.

A habit I spent effort building, made redundant by finding a better solution. That’s probably the best kind of waste.

Alex Hsu

Alex Hsu

Indie developer, AI music miner, aspiring writer, ADHD.
Documenting my journey of personal growth and the pursuit of simplicity.