Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolspackage.json ValidatorSPDX License Checker

SPDX License Checker

dev

Check the license field of a package.json against the SPDX list, as npm does

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.

npm prints "license should be a valid SPDX license expression" when the license field is not exactly an SPDX identifier such as MIT or Apache-2.0, a combination such as (MIT OR Apache-2.0), UNLICENSED, or SEE LICENSE IN followed by a file name. The check here uses the same rules and the same list of 734 identifiers, and suggests the right spelling for near misses such as "Apache 2.0".

Next:
  • Semver Checker Test versions against an npm range such as ^1.2.3, sort them and see the next version
  • JSON Schema Validator Validate JSON against a JSON Schema (2020-12, 2019-09, draft 7), with each error located

How to use SPDX License Checker

1

Paste or type your input.

2

Choose the options you need.

3

Press Ctrl+Enter, then copy or download.

How SPDX License Checker works

npm reads package.json strictly in some places and loosely in others: a bad version stops everything, while a missing description only earns a warning. This page checks the file in three layers and shows each separately.

2. What npm says. The warnings and errors npm itself prints for this file, word for word, such as "No repository field." or "Invalid version". They come from rewriting npm's own normalize-package-data, validate-npm-package-name and validate-npm-package-license, and the tests compare the answers with those packages on 80 sample files, 44 names and 54 license strings.

npm message What to do
Invalid version: "1.0" Write three numbers, such as 1.0.0
No license field. Add "license": "MIT" or another SPDX id
license should be a valid SPDX license expression Use the exact id, such as Apache-2.0
scripts['server'] should probably be scripts['start']. Rename the script to start
name can no longer contain capital letters Use lower case for a new package

The rest of the article, and all 6 questions about package.json Validator, are on the package.json Validator page.

Frequently asked questions

Why does npm say license should be a valid SPDX license expression?

The license field must be an exact SPDX identifier, such as MIT, ISC or Apache-2.0, or a combination like (MIT OR Apache-2.0). Near misses such as "mit", "Apache 2.0" or "BSD" fail. For closed-source code write UNLICENSED, or SEE LICENSE IN LICENSE.txt to point at your own file.

Can an npm package name have capital letters?

Not for a new package. Names must be lower case, at most 214 characters, URL-safe, must not start with a dot or underscore, and must not be a Node.js core module such as http. Some old packages have capitals because the rules came later, and npm still installs them, but it refuses a new one.

Can package.json have comments?

No. package.json is strict JSON, which has no comments, so a // or /* line stops npm from reading the file. A common workaround is a key named "//" with a string value; npm ignores keys it does not know. The syntax check here points at the line of the comment.

What does No repository field mean?

npm warns when package.json has no repository, because the npm website links to the source code from it. Add "repository": {"type": "git", "url": "git+https://github.com/user/repo.git"}. The warning does not stop anything, and npm skips it entirely for a package marked "private": true.

Sources

  • npm Docs, package.jsonFields, name rules, version, license and dependency specs
  • npm/normalize-package-data (GitHub)The warnings and errors npm prints when it reads a package.json
  • npm/validate-npm-package-name (GitHub)Name errors and the warnings for names only old packages may use
  • SPDX License ListThe license identifiers and exceptions a license expression may use

Last verified 16 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about package.json Validator and anybody who knows can answer. No account needed.

More ways to use package.json Validator

  • package.json ValidatorCheck a package.json the way npm reads it: name, version, license, dependencies and syntax
  • npm Package Name CheckerCheck whether a name is allowed on npm: capitals, scopes, length, core module names

Same job, other tools: Twitter Card Validator – Check twitter:card tags and the og: tags X falls back to.

On the related tools: Readability Checker – Flesch reading ease and grade level, with what to change · JSONPath Evaluator – Evaluate a JSONPath expression and get the matching values and their paths.

Related tools

All developer tools
Regex TesterTest JavaScript regular expressions with live highlighting and a plain-English explanationDiff CheckerCompare two texts side by side and see every added and removed lineJSON DiffCompare two JSON documents and list every added, removed and changed valueOpen Graph PreviewPaste a page and see the share card for Facebook, LinkedIn, X, WhatsApp and SlackKeyword Density and ReadabilityWord and phrase counts, densities, reading time and a Flesch readability scoreHTTP Status CodesEvery HTTP status code, what it means, when to send it and the RFC it comes fromUser-Agent ParserRead a user-agent string: browser, engine, OS, device type and whether it is a botJSONPath TesterRun RFC 9535 JSONPath queries on pasted JSON and see every match highlighted
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)