Skip to content
Generate SoftWare IDentification (SWID) Tags according to ISO/IEC 19770-2:2015
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

SoftWare IDentification (SWID) Tags Generator (Java Library)

Build Status Maven Central Apache License 2.0

Generate SoftWare IDentification (SWID) Tags according to ISO/IEC 19770-2:2015

What are SWID Tags?

SoftWare IDentification (SWID) Tags record unique information about an installed software application, including its name, edition, version, whether it’s part of a bundle and more. SWID tags support software inventory and asset management initiatives. The structure of SWID tags is specified in international standard ISO/IEC 19770-2:2015.

Quick Start

The recommended way to get started using swid-generator in your project is by adding it as dependency in your build system:




dependencies {
    compile 'com.labs64.utils:swid-generator:x.y.z'


To generate SoftWare IDentification (SWID) Tag (gist):

// prepare SWID Tag processor
DefaultSwidProcessor processor = new DefaultSwidProcessor();
processor.setGenerator(new SequentialIdGenerator(0, 1, "e", null));
        .addEntity(new EntityBuilder().name("Labs64")
        .addLink(new LinkBuilder().rel("supplemental")
        .addMetaData(new SoftwareMetaBuilder().description("This is what it's about")
        .addEvidence(new EvidenceBuilder()
                .date(new Date())
                .directoryOrFileOrProcess(new FileBuilder()
        .addPayload(new PayloadBuilder()
                .directory(new DirectoryBuilder()
// create builder and pass processor as build param
SwidBuilder builder = new SwidBuilder();
SoftwareIdentity swidTag =;
// output resulting object
SwidWriter writer = new SwidWriter();
StringWriter out = new StringWriter();
writer.write(swidTag, out);


...this generates the following SoftWare IDentification (SWID) Tag:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SoftwareIdentity name="NetLicensing" supplemental="true" tagId="e_1" version="2.1.0" versionScheme="unknown" xmlns="" xmlns:ns2="">
    <Entity name="Labs64" role="softwareCreator softwareLicensor tagCreator"/>
    <Link href="swid:other-swid-tag" rel="supplemental"/>
    <Meta description="This is what it's about" entitlementDataRequired="true" revision="3"/>
    <Evidence date="2020-04-24Z" xml:lang="123-a">
        <File name="File.xml" size="10" version="3"/>
        <Directory key="true" location="/folder" root="/data"/>


This library requires J2SE 1.8 or newer. All dependencies handled by Maven.



Fork the repository and make some changes. Once you're done with your changes send a pull request and check CI validation status. Thanks!

Contributors and Supporters

Thank you to all the contributors on this project. Your help is much appreciated!

Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues.


This library is open-sourced software licensed under the Apache License 2.0.

You can’t perform that action at this time.