SBOM Generator Online

Generate a CycloneDX 1.6 or SPDX 2.3 SBOM from package-lock, yarn, pnpm, poetry, composer, go.sum or Cargo.lock; validate, convert, diff and merge SBOMs.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

A Software Bill of Materials lists every component inside your software. The EU Cyber Resilience Act makes SBOMs mandatory for products sold in the EU (vulnerability reporting from 11 September 2026, full obligations from 11 December 2027), and US federal buyers already ask for them. action=generate builds one from a lockfile: package-lock.json / npm-shrinkwrap.json, yarn.lock (v1 and Berry), pnpm-lock.yaml, requirements.txt (pinned == lines), poetry.lock, Pipfile.lock, composer.lock, go.sum / go.mod, Cargo.lock and Gemfile.lock. Each component gets a package URL (purl), the lockfile hash (npm SHA-512 integrity, Cargo SHA-256 checksum, Composer SHA-1), the licence when the lockfile has it (normalised to an SPDX expression) and the dependency graph when the lockfile records it.

Output is CycloneDX 1.6 JSON (default) or SPDX 2.3 JSON (output=spdx); download=1 returns the file itself. action=validate checks a CycloneDX (1.2–1.7) or SPDX 2.x JSON document: required fields, enumerations, unique bom-refs / SPDXIDs, references that resolve, hash length, purl syntax, SPDX licence expressions, plus the NTIA minimum elements (supplier, name, version, unique identifier, dependencies, author, timestamp) with coverage percentages. action=convert turns CycloneDX into SPDX and back, action=diff compares two SBOMs (added, removed, upgraded, downgraded, licence changes) and action=merge combines up to 20.

vulns=1 looks every component up on OSV.dev and adds the advisories (CycloneDX vulnerabilities, SPDX security references). The code is APIBox's own (no CycloneDX library); validation follows the specifications' rules but is not a full JSON Schema run. An SBOM built from a lockfile cannot see vendored code, native libraries or OS packages.

Use this in your code

curl -X POST "https://apibox.io.vn/v1/sbom-tools" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"generate","lockfile":"# yarn lockfile v1\n\n\"@babel/code-frame@^7.0.0\":\n  version \"7.12.13\"\n  resolved \"https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz\"\n  integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==\n  dependencies:\n    \"@babel/highlight\" \"^7.12.13\"\n\n\"@babel/highlight@^7.12.13\":\n  version \"7.13.10\"\n  integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==\n  dependencies:\n    js-tokens \"^4.0.0\"\n\njs-tokens@^4.0.0:\n  version \"4.0.0\"\n  integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\n","name":"my-app","version":"1.0.0"}'

API documentation → Get a free API key

FAQ

CycloneDX or SPDX?

Both are accepted by most tools and regulators. CycloneDX is common in security tooling (OWASP); SPDX is an ISO standard (ISO/IEC 5962) often used for licence compliance. You can convert between them here.

Why are licences missing for npm packages?

npm lockfiles usually do not store licences. Composer locks do. Run the spdx-license or dep-audit endpoints with latest=1 to look licences up from the registries.

Is my lockfile stored?

No. It is parsed in memory and the SBOM is returned in the response; nothing is logged.