Skip to content
100% local

npm ⇄ yarn ⇄ pnpm converter

Convert an npm, yarn, pnpm, bun or deno command to the equivalent command in another package manager.

Input
Output

npm ⇄ yarn ⇄ pnpm converter

Paste a package manager command and this tool rewrites it for npm, Yarn classic, Yarn berry, pnpm, Bun or Deno. Switching a project, following a README written for a different tool, or just typing muscle memory from the wrong manager — the command you have is not the one you need, and this converts it instantly instead of making you look up the equivalent flag by hand.

The source manager can be auto-detected from the command itself or set explicitly (useful if you want lines from other managers flagged rather than silently skipped). The target manager is one of npm, Yarn classic, Yarn berry, pnpm, Bun or Deno. Install, add and remove commands carry their flags across correctly — npm's --save-dev becomes Yarn's --dev, pnpm's --save-exact, or Bun's --dev, and a bare npm ci becomes an install with --frozen-lockfile, or --immutable for Yarn berry. Run-script commands and their trailing arguments after -- are preserved too. Turn on "preserve flags with no equivalent" to keep an unrecognized flag verbatim in the output rather than dropping it, and "warn about flags with no equivalent" to get a # comment line flagging exactly which flag or command has no direct match — Yarn berry's removal of global add is one such case.

By default only the first command in the input is converted; turn on batch mode to convert every line at once, which is useful for translating a whole install script. Lines that don't look like a package manager command are passed through unchanged in batch mode (with a warning if enabled), or produce an error in single-command mode. Windows and Unix line endings are both handled.

Everything runs locally in your browser — no command or package name is ever sent anywhere. Copy the result, download it as a .txt file, or send it back into the input to convert again for a third manager.

FAQ

Which commands are supported?
Installing all dependencies (including npm ci and frozen-lockfile installs), adding packages (with --save-dev/--dev, --save-exact/--exact and global flags), removing packages, and running package.json scripts with extra arguments after --. Deno is covered on both sides: a package becomes npm:chalk, a global install becomes deno install --global, and a script becomes deno task.
What happens to a flag with no equivalent in the target manager?
With "preserve flags" on it is kept verbatim at the end of the output line; with "warn about flags" on you also get a # comment noting exactly which flag has no match, such as Yarn berry no longer supporting global add.
Does it detect which manager the input command is from?
Yes, by default. You can also pick a source manager explicitly, in which case a line written for a different manager is flagged instead of converted.
Can I convert a whole install script at once?
Turn on batch mode to convert every line of the input independently; without it only the first command is converted.
Is my command or package list uploaded anywhere?
No. The conversion runs entirely in your browser — nothing you paste here is sent to a server.