As of npm 3.10 you have to use UNLICENSED:

{ "license": "UNLICENSED"}

or

{ "license": "SEE LICENSE IN <filename>"}

The value of license must either one of the options above or the identifier for the license from this list of SPDX licenses. Any other value is not valid.

The following is no longer valid for current versions of npm

For npm versions before 3.10 you may use:

{ "license" : "LicenseRef-LICENSE" }

Then include a LICENSE file at the top level of the package. It could be as short as:

(c) Copyright 2015 person or company, all rights reserved.

But you might want to be more explicit about what is not allowed.

Answer from Craig on Stack Exchange
๐ŸŒ
SPDX
spdx.org โ€บ licenses
SPDX License List | Software Package Data Exchange (SPDX)
The SPDX License List itself is ... or documentation. The SPDX License List includes a standardized short identifier, the full name, the license text, and a canonical permanent URL for each license and exception....
๐ŸŒ
Spdx
spdx.dev โ€บ learn โ€บ handling-license-info
Handling License Info โ€“ SPDX
A file like this would use the following expression as its short-form identifier: // SPDX-License-Identifier: GPL-3.0-only WITH Autoconf-exception-3.0 The current list of SPDX license exceptions is available here.
Discussions

licensing - Which SPDX license is equivalent to 'All Rights Reserved'? - Software Engineering Stack Exchange
You can also just set "private": true and it won't bother you about including a license. ... Also make sure not to confuse the npm-recommended "UNLICENSED" with the SPDX compliant identifier "Unlicense", which is the exact opposite of "all rights reserved". More on softwareengineering.stackexchange.com
๐ŸŒ softwareengineering.stackexchange.com
June 4, 2015
Is there a difference between unlicense.org and SPDX UNLICENSED? - Open Source Stack Exchange
When you publish Solidity code, you can include machine-readable license identifier in the beginning of the file. Usually, it looks like this: // SPDX-License-Identifier: MIT pragma solidity ^0.8.7... More on opensource.stackexchange.com
๐ŸŒ opensource.stackexchange.com
December 10, 2021
java - SPDX identifier for "proprietary" in Maven pom.xml `<license>` name - Stack Overflow
I want to add a license to the pom.xml stating that the project is licensed as proprietary, "All rights reserved.". The Pom Reference states that Using an SPDX identifier as the license ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
SPDX-License-Identifier: MIT
It's the license name, named after the US university where it was created. https://opensource.org/licenses/MIT More on reddit.com
๐ŸŒ r/solidity
8
3
September 11, 2021
๐ŸŒ
SPDX
spdx.org โ€บ licenses โ€บ archive โ€บ archived_ll_v1.17
SPDX Standard Licenses
The SPDX License List is a list ... an SPDX document. The SPDX License List includes a standardized short identifier, full name for each license, vetted license text, other basic information, and a canonical permanent URL....
๐ŸŒ
Spdx
spdx.github.io โ€บ spdx-spec โ€บ v2.3 โ€บ SPDX-license-list
Annex A: SPDX License List - SPDX Specification 2.3.0
The SPDX License List itself is ... or documentation. The SPDX License List includes a standardized short identifier, the full name, the license text, and a canonical permanent URL for each license and exception....
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ spdx-license-ids
spdx-license-ids - npm
February 20, 2026 - All license IDs except for the currently deprecated ones. const ids = require('spdx-license-ids'); //=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...] ids.includes('BSD-3-Clause'); //=> true ids.includes('CC-BY-1.0'); //=> true ids.includes('GPL-3.0'); //=> false
      ยป npm install spdx-license-ids
    
Published ย  Feb 20, 2026
Version ย  3.0.23
Author ย  Shinnosuke Watanabe
Find elsewhere
๐ŸŒ
FOSSA
fossa.com โ€บ home โ€บ blog โ€บ understanding and using spdx license identifiers and license expressions
Understanding and Using SPDX License Identifiers and License Expressions | FOSSA Blog
September 11, 2023 - For example, the License Identifier for the Apache License 2.0 is Apache-2.0. SPDX License Expressions are used to communicate the context that informs how a license(s) applies to the open source code it governs.
Top answer
1 of 2
19

Unfortunately, the format SPDX-License-Identifier: UNLICENSED is an invalid SPDX license expression per the SPDX spec, because the identifier UNLICENSED is not part of the SPDX license list. While well-intentioned, Solidity has here caused potentially dangerous confusion.

The SPDX project is concerned about machine-readable annotations for FOSS licenses (free/libre or open source software). By default, software is โ€œall rights reserved. For such software, it makes no sense to add an SPDX tag. Yet, the Solidity documentation is suggesting to refer to such all-rights reserved software as โ€œunlicensedโ€.

The Unlicense is a license or license-like legal device that tries to do the very opposite of โ€œall rights reservedโ€: it is a very permissive license that allows any use, and may even be equivalent to a public domain dedication that relinquishes any copyright. It's a bit confusingly written and has a confusing name so I don't recommend that anyone should use the license, but it's popular with people who don't like to think about licensing and want their software to be used however anyone wants, without limitations.

So Solidity's nonstandard UNLICENSED identifier is VERY DIFFERENT from the SPDX Unlicense identifier. See also Solidity issue #12251. Per SPDX-spec issue #49, it would have been better to represent unlicensed software with NONE, but that's not yet part of the formal SPDX license identifier syntax.

2 of 2
7

The two statuses are about as far apart as could be. Having no licence means, as we've said before, that you have no rights to use the code at all. Being licensed under the Unlicense means that you have about as many rights to the code as the author can grant.

I agree that the texts are close (UNLICENSED for the former, Unlicense for the latter). Some might say they're confusingly close. But they are different, and moreover the former seems to be a Solidity convention, not an SPDX official identifier. So with care you can be sure which of the two licensing regimes applies to any piece of Solidity code bearing one of these identifiers.

๐ŸŒ
GitHub
github.com โ€บ david-a-wheeler โ€บ spdx-tutorial โ€บ blob โ€บ master โ€บ README.md
spdx-tutorial/README.md at master ยท david-a-wheeler/spdx-tutorial
A SPDX license expression can be simple SPDX license identifier or a SPDX "user defined license reference" (aka LicenseRef). A LicenseRef can be used if a license isn't already defined by a standard SPDX license identifier. We won't go into how you do that in this tutorial...
Author ย  david-a-wheeler
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ Software_Package_Data_Exchange
Software Package Data Exchange - Wikipedia
February 2, 2026 - SPDX 2.2.1 was submitted to the ... Specification V2.2.1 in August, 2021. Each license is identified by a full name, such as "Mozilla Public License 2.0" and a short identifier, here "MPL-2.0"....
Top answer
1 of 2
2

The accepted answer to this question is wrong. The SPDX specification offers LicenseRefs for this use case, so you could put a value such as LicenseRef-acme-corp-proprietary-license in the <name> field, and then a link to the full text of your proprietary license in the <url> field (to allow human lawyers to do appropriate due diligence). Any conforming SPDX processor / expression parser should handle it just fine.

As of SPDX v3.0 (not yet released, at the time of writing), a similar mechanism called AdditionRef will also be offered for License Exceptions, which will make SPDX expressions such as Apache-2.0 WITH AdditionRef-acme-corp-specific-modifications possible.

2 of 2
0

SPDX has no identifier for "proprietary" in the license list because there is no such license.

Similar "All rights reserved." is not a license. Its the default for copyrighted works.

The convention in composer.json to use "proprietary" is an inverse effect: In the Composer project SPDX license identifiers were introduced relatively early and the license field has to use the short identifiers to build the license string (you can have multiple licenses in that field).

As the license field in composer.json then was defined by that, any other license not in the SPDX license list could not be named. As those are normally "closed software" licenses, the common term "proprietary" was suggested (all lower-case, no confusion with SPDX short identifiers which use upper-case letters).

The situation in pom.xml is different. It does not require specific identifiers, it just recommends them for the name field:

<licenses>
  <license>
    <name>Apache License, Version 2.0</name>
    <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    <distribution>repo</distribution>
    <comments>A business-friendly OSS license</comments>
  </license>
</licenses>

It offers its own system to name/define the license. And to use the (long) SPDX Identifier for the name is only a (sane) recommendation, but naturally only if you're using a license from that list.

But if you have a license your own, you put its name and the uniform resource location of the license text in there. There is no problem if you have an individual license (compare: in Composer you technically can not use the license field if you don't SPDX it)

Now:

According to your question you neither have yet a Name nor the Text of your license.

But you are already confronted with technical questions about how to incorporate and connect what is not there. As you'd like to have a license (you want to add a license entry into the pom.xml), I'd say why not get help from a lawyer on your behalf that is able to find a textual expression of your proprietary wishes. Tell her what you wish, want and need, like you want to fill out these two <name>and <url> fields and until then you just document the process:

<licenses>
  <license>
    <name/>
    <url/>
    <distribution/>
    <comments>Intentionally left blank.</comments>
  </license>
</licenses>

This certainly is only a very early and very basic baseline, you're certainly able to tweak it even before you consider grabbing the phone.

๐ŸŒ
Medium
medium.com โ€บ @nareshmmr โ€บ when-you-write-smart-contracts-using-solidity-you-often-see-the-line-spdx-license-identifier-20317b02b4e6
The Importance of // SPDX-License-Identifier in Smart Contracts | by Naresh Mohanraj | Medium
May 31, 2024 - SPDX stands for Software Package Data Exchange. Itโ€™s a standard way to specify the license of software. By using an SPDX license identifier, like MIT, we make it easy for anyone to understand what they can and cannot do with the code.
๐ŸŒ
GitHub
github.com โ€บ spdx โ€บ license-list-data
GitHub - spdx/license-list-data: Various data formats for the SPDX License List including RDFa, HTML, Text, and JSON ยท GitHub
This repository contains various generated data formats for the SPDX License List including RDFa, HTML, Text, and JSON. The source of the license list which generates these data files can be found at https://github.com/spdx/license-list-XML.
Starred by 645 users
Forked by 191 users
Languages ย  HTML
๐ŸŒ
Spdx
spdx.github.io โ€บ spdx-spec โ€บ v2.3 โ€บ SPDX-license-expressions
Annex D: SPDX License Expressions - SPDX Specification 2.3.0
We provide the definition of what constitutes a valid an SPDX License Expression in this section. The exact syntax of license expressions is described below in ABNF. idstring = 1*(ALPHA / DIGIT / "-" / "." ) license-id = <short form license identifier in Annex A.1> license-exception-id = <short form license exception identifier in Annex A.2> license-ref = ["DocumentRef-"(idstring)":"]"LicenseRef-"(idstring) simple-expression = license-id / license-id"+" / license-ref compound-expression = (simple-expression / simple-expression "WITH" license-exception-id / compound-expression "AND" compound-expression / compound-expression "OR" compound-expression / "(" compound-expression ")" ) license-expression = (simple-expression / compound-expression)
๐ŸŒ
PyPI
pypi.org โ€บ project โ€บ spdx-license-list
spdx-license-list ยท PyPI
id (str) - short identifier to identify a match to licenses in the context of an SPDX file, a source file, or elsewhere
      ยป pip install spdx-license-list
    
Published ย  Mar 03, 2026
Version ย  3.28.0
๐ŸŒ
Solidity
docs.soliditylang.org โ€บ en โ€บ v0.6.8 โ€บ layout-of-source-files.html
SPDX License Identifier
The compiler does not validate that the license is part of the list allowed by SPDX, but it does include the supplied string in the bytecode metadata. If you do not want to specify a license or if the source code is not open-source, please use the special value UNLICENSED.
๐ŸŒ
Spdx
spdx.dev
SPDX โ€“ Linux Foundation Projects Site
The SPDX specification is a freely available international open standard (ISO/IEC 5962:2021).