Skip to content
Generate RFC-compliant UUIDs in JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead, 77 commits behind kelektiv:master.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore added an angular wrapper. Feb 16, 2015
.npmignore renamed main module and added an npm ignore. Feb 16, 2015 Update Feb 21, 2015
angular-uuid.js Use logic from node-uuid v1.4.7 Aug 9, 2016
bower.json Update Bower module name May 12, 2016
package.json Use logic from node-uuid v1.4.7 Aug 9, 2016


angular-uuid is an AngularJS wrapper for Robert Kieffer's node-uuid, which provides simple, fast generation of RFC4122 UUIDS.


  • AngularJS service – no global scope pollution
  • Generate RFC4122 version 1 or version 4 UUIDs
  • Cryptographically strong random # generation on supporting platforms
  • Tiny file size when minified.


If using CommonJS then simply require angular-uuid as per usual, prior to setting up your AngularJS modules (but after including angular):

npm install --save angular-uuid

Otherwise use a regular script tag (after including angular):

<script src="angular-uuid.js"></script>

Angular Module Usage

Ensure that you include angular-uuid in your module definition:

var CoolApp = angular.module("CoolApp", ["angular-uuid"]);

You can then inject uuid where necessary, for example:

CoolApp.controller("MainCtrl", ["uuid", MainCtrl]);

function MainCtrl (uuid)
    var hash = uuid.v4();


Full documentation is available via the original project's readme:

You can’t perform that action at this time.