Package
string-width
Get the visual width of a string - the number of columns required to display it
Key numbers
As of 25 Sept 2026
- Weekly downloads
- 374.9m
- +63% over 12 months
- Gzip bundle size
- -
- No Bundlephobia data
- Dependencies
- 2
- Direct, from package.json
- Last release
- today
- v8.3.0
- GitHub stars
- 528
- 44 forks
- Open issues / PRs
- 1 / 1
- Contributors
- 15
- Commits, last 52 weeks
- 14
Downloads
Last week 2026-09-15 to 2026-09-21
374,902,821 downloads last week, 1,727,383,989 in the last month. The 12-month change of +63% compares the average of the last 4 weeks with the first 4 weeks of the series.
- Releases, last 12 months
- 531 in total
- Latest version
- 8.3.0, 24 Sept 2026today
- First published
- 16 Jul 2015
- Last push to GitHub
- 24 Sept 2026same day as the snapshot
- Repository archived
- No
- Open issues
- 1
- Open pull requests
- 1
- Commits, last 52 weeks
- 14
- Dependents on npm
- 7,729
Major versions
- v8 first release 8.0.0, 22 Aug 2025
- v7 first release 7.0.0, 28 Oct 2023
- v6 first release 6.0.0, 6 May 2023
- v5 first release 5.0.0, 16 Apr 2021
- v4 first release 4.0.0, 18 Mar 2019
- v3 first release 3.0.0, 15 Dec 2018
- v2 first release 2.0.0, 22 Sept 2016
- v1 first release 1.0.0, 16 Jul 2015
Recent releases
| Version | Published |
|---|---|
| 8.3.0 | 24 Sept 2026 |
| 8.2.2 | 8 Jul 2026 |
| 8.2.1 | 27 Apr 2026 |
| 8.2.0 | 18 Feb 2026 |
| 8.1.1 | 29 Jan 2026 |
| 8.1.0 | 1 Sept 2025 |
| 8.0.0 | 22 Aug 2025 |
| 7.2.0 | 30 Jun 2024 |
| 7.1.0 | 22 Jan 2024 |
| 7.0.0 | 28 Oct 2023 |
| 6.1.0 | 6 May 2023 |
| 6.0.0 | 6 May 2023 |
| 5.1.2 | 28 Feb 2022 |
| 5.1.1 | 27 Feb 2022 |
- Module format
- ESM onlyFrom package.json type, main and exports fields
- TypeScript types
- Bundled
- Node.js engine range
- >=20
- Runtimes
- -
- Unpacked size (npm)
- 12 kB
- Dependencies (2)
strip-ansiget-east-asian-width
npm install string-width- jsDelivr
https://cdn.jsdelivr.net/npm/string-width@8.3.0/ - unpkg
https://unpkg.com/string-width@8.3.0/ - esm.sh
https://esm.sh/string-width@8.3.0
Indexability: Indexed.