Description
pangu.js is a JavaScript library and Chrome extension that adds spaces between Chinese, Japanese and Korean text and Latin letters, digits and symbols. The project calls this opinionated paranoid text spacing. The library works in Node.js and in browsers, with a browser build that can process the page. There are also official ports for Python, Go, Java and an HTTP API, and several community ports for other languages. The Chrome extension applies the spacing to every page you browse. Its AI Spacing feature addresses cases where a regex rule cannot tell meaning apart, such as a plus sign that means 'or more' in one sentence and a join in another. For those cases the extension asks a language model, using Chrome's built-in Prompt API, which runs Gemini Nano on the device, so nothing leaves the machine. The README says the extension is free. The source and the changelog are on GitHub, and the library is published on npm, with CDN links from jsDelivr, unpkg and cdnjs.…
Highlights
- Adds spaces between CJK and Latin text
- Library for JavaScript, Python, Go and Java
- Chrome extension for every page
- On-device AI for ambiguous symbols
- CDN builds for browsers
Ratings & Reviews
No ratings yet
Be the first to rate Pangu.js.
People also visit
Pangu.js FAQ
What does pangu.js do?
It inserts spaces between Chinese, Japanese or Korean text and English letters, digits and symbols.
Is there a Chrome extension?
Yes. The extension spaces the text on every page you browse, and the README says it is free.
What is AI Spacing?
A feature that asks an on-device model to decide when a symbol like plus or minus needs spaces, based on context.
Does the AI send my text anywhere?
The README says it uses Chrome's built-in Prompt API with Gemini Nano on your device, and nothing leaves your machine.
How do I install the library?
From npm, or through a CDN such as jsDelivr, unpkg or cdnjs, as the README shows.
Is it free?
Yes. The library and the extension are free and open source on GitHub.
What are the best Pangu.js alternatives?
Popular alternatives to Pangu.js include ChromeAI Gemini Chatbot, MouseTooltipTranslator and Clean Paste AI. See all Pangu.js alternatives




