.npmrc Config Generator
Generate an npm .npmrc configuration file — default and scoped (per-org) registries, per-registry auth (token, basic, or legacy username/password) via environment-variable placeholders, save-exact/legacy-peer-deps/audit-level, and proxy/strict-ssl settings.
Input
The registry npm installs unscoped packages from.
One per line: @scope registry-url — routes @scope/* package installs to that registry.
Authentication
Common Settings
Minimum vulnerability severity that causes `npm audit`/install-time audit to exit non-zero.
Proxy
Only disable this on a trusted internal network behind a proxy that re-signs certificates.
Output
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/npmrc-config-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"registry": "https://registry.npmjs.org/",
"scopedRegistries": "",
"authType": "none",
"authRegistry": "",
"tokenEnvVar": "NPM_TOKEN",
"basicAuthEnvVar": "NPM_AUTH_BASE64",
"usernameEnvVar": "NPM_USERNAME",
"passwordEnvVar": "NPM_PASSWORD_BASE64",
"emailEnvVar": "NPM_EMAIL",
"alwaysAuth": "",
"saveExact": "",
"legacyPeerDeps": "",
"engineStrict": "",
"auditLevel": "low",
"proxy": "",
"httpsProxy": "",
"noProxy": "",
"strictSsl": "true"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `npmrc-config-generator` tool (.npmrc Config Generator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/npmrc-config-generator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title=".npmrc Config Generator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
The .npmrc Config Generator builds a ready-to-use npm configuration file from a set of fields — no need to remember exact key names or npm's //host/path/:key=value auth syntax. Set your registry, authentication, and install options, then copy or download the result.
What it does
.npmrc is a plain key=value file, but several of its keys have syntax that's easy to get subtly wrong by hand — a mistyped auth line fails silently instead of erroring, and a copy-pasted https:// prefix on a per-registry auth key never matches. This tool assembles a complete, correctly-formatted file:
- Default and scoped registries — the registry npm installs from by default, plus any
@scoperegistries for private/org packages (GitHub Packages, a self-hosted Verdaccio, etc.). - Authentication — token (
_authToken), basic (_auth), or the legacy username/password/email trio, all scoped to the right registry host. - Common install settings —
save-exact,legacy-peer-deps,engine-strict, andaudit-level. - Proxy settings —
proxy,https-proxy,noproxy, andstrict-ssl.
It never generates a real secret
Every credential field produces an ${ENV_VAR} reference — npm's own config substitution syntax — instead of a literal token or password. That means the generated .npmrc is safe to commit to a repo or paste into a CI config: the actual secret lives in an environment variable (NPM_TOKEN, or whatever name you choose), never in the file itself.
How to use it
- Set your default registry (defaults to the public npm registry) and add any scoped registries, one per line as
@scope registry-url. - Pick an auth method if the registry needs credentials, and set which environment variable name npm should read the value from at install time.
- Toggle the common settings and proxy settings your project needs.
- Copy the generated file, or download it directly as
.npmrc.
The output updates instantly as you change any option.
Where do I put the actual token?
Set the real value in the environment variable you named (e.g. export NPM_TOKEN=... locally, or a CI secret named NPM_TOKEN) — never in the .npmrc file itself. npm substitutes ${VAR} references at install time.
Does this work for Yarn or pnpm too?
pnpm reads the same .npmrc format and honors the same keys. Yarn Berry (v2+) uses a different file, .yarnrc.yml, with its own syntax — this generator targets npm/pnpm's .npmrc format specifically.
What if I need to publish from CI?
Combine this with the GitHub Actions Workflow Generator — generate the .npmrc here with a token env-var reference, then reference the same secret name in your workflow's env: block.
Privacy
This generator runs entirely in your browser. Your selections are never uploaded, logged, or stored — the file is assembled locally from the options you choose, and nothing leaves your device.