
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
uuid-by-string
Advanced tools
Generates the RFC-4122 Name-Based UUID. Supports 3 and 5 versions of UUID.
# via NPM
npm install uuid-by-string
# or Yarn
yarn add uuid-by-string
The package has only one default exported method. Method receives any string and returns generated hash
const getUuid = require('uuid-by-string');
const uuidHash = getUuid('Hello world!');
// d3486ae9-136e-5856-bc42-212385ea7970
The string Hello world! will always returns d3486ae9-136e-5856-bc42-212385ea7970.
You can specify the UUID version. Available versions is 3 and 5 according to RFC-4122. The version is responsible for the hashing algorithm: version 3 uses MD5, and version 5 uses SHA-1. SHA-1 used by default if version is not specified.
const uuidV3Hash = getUuid('Hello world!', 3);
// 86fb269d-190d-3c85-b6e0-468ceca42a20
const uuidV5Hash = getUuid('Hello world!', 5);
// d3486ae9-136e-5856-bc42-212385ea7970
getUuid(name [, version]);
getUuid(name [, namespace, version]);
name — hashing targetnamespace Optional — UUID namespaceversion Optional — 3 or 5, version of UUIDFAQs
Generating uuid-hash from string
The npm package uuid-by-string receives a total of 124,923 weekly downloads. As such, uuid-by-string popularity was classified as popular.
We found that uuid-by-string demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.