Skip to content
JS
Package

string-width

Get the visual width of a string - the number of columns required to display it

v8.3.0, 24 Sept 2026MITESM onlyTypes: BundledCLI tools and terminal utilities
$ npm install string-width

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
0200m400m600mSept 2025Mar 2026Sept 2026High 525.5m (16 Jun 2026)Low 161m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

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

  1. v8 first release 8.0.0, 22 Aug 2025
  2. v7 first release 7.0.0, 28 Oct 2023
  3. v6 first release 6.0.0, 6 May 2023
  4. v5 first release 5.0.0, 16 Apr 2021
  5. v4 first release 4.0.0, 18 Mar 2019
  6. v3 first release 3.0.0, 15 Dec 2018
  7. v2 first release 2.0.0, 22 Sept 2016
  8. v1 first release 1.0.0, 16 Jul 2015

Recent releases

VersionPublished
8.3.024 Sept 2026
8.2.28 Jul 2026
8.2.127 Apr 2026
8.2.018 Feb 2026
8.1.129 Jan 2026
8.1.01 Sept 2025
8.0.022 Aug 2025
7.2.030 Jun 2024
7.1.022 Jan 2024
7.0.028 Oct 2023
6.1.06 May 2023
6.0.06 May 2023
5.1.228 Feb 2022
5.1.127 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
  • jsDelivrhttps://cdn.jsdelivr.net/npm/string-width@8.3.0/
  • unpkghttps://unpkg.com/string-width@8.3.0/
  • esm.shhttps://esm.sh/string-width@8.3.0

Related

Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.