uuid
RFC4122 (v1, v4, v5, v6, v7, v8) UUID Generator and Parser for Dart
4.6.0
1000K downloads/mo
#3 most downloaded on pub.dev
Daegalus/dart-uuid
What this package is like to depend on
Last release 1 months ago
15 Jul 2026
Release timing varies
gaps range from 4 weeks to 1.1 years
Nearly every release is documented
notes for 59 of 61 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
69 releases · first in 2012
3 releases in the last 12 months
see the full history below
Release timeline
69 releases · Oct 2012 to Jul 2026Releases
latest 60 of 69-
4.6.015 Jul 2026Release notes
Open source →What's Changed
- Update All (major) by @renovate[bot] in #143
- Add support for loose validation by @DPDmancul in #145
New Contributors
- @DPDmancul made their first contribution in #145
Full Changelog: 4.5.3...4.6.0
Release notes
Open source →- Add explicit 128-bit hexadecimal format validators:
Uuid.isValidUUIDFormat(...),UuidValue.validateFormat(),UuidValidation.isValidUUIDFormat(...), andUuidValidation.isValidFormatOrThrow(...). (thanks @DPDmancul) - Add
UuidValue.withFormatValidation(...)for values whose UUID version and variant bits should not be checked. (thanks @DPDmancul) - Add
Uuid.parseHex128(...),Uuid.parseHex128AsByteList(...),UuidParsing.parseHex128(...), andUuidParsing.parseHex128AsByteList(...). (thanks @DPDmancul) - Require exact single-line 8-4-4-4-12 or 32-character hexadecimal input and exactly 16 bytes during format validation.
- Expose the existing
noDashesparsing option through the publicUuidparse methods.
-
4.5.321 Feb 2026Release notes
Open source →What's Changed
- Update actions/checkout action to v6 by @renovate[bot] in #138
- Add binary input support for UUIDv5 (RFC 4122/9562 compliant) by @ljanecek in #137
- fix: Remove the
experimentalannotation from theUuidValueclass by @marcelomendoncasoares in #141
New Contributors
- @ljanecek made their first contribution in #137
- @marcelomendoncasoares made their first contribution in #141
Full Changelog: 4.5.2...4.5.3
Release notes
Open source →- Remove experimental flag on UUIDValue and remote meta dependency. (thanks @marcelomendoncasoares)
- Add binary support to UUIDv5 (thanks @ljanecek)
-
4.5.203 Nov 2025Release notes
Open source →What's Changed
- Fix validation to allow MAX UUID (
FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF) as it is valid. - Add
strictRFC9562and deprecatestrictRFC4122to facilitate a rename. This will be remove in v5 - Remove
sprintfdependency by @julemand101 in #132 - Add const constructor to CryptoRNG class by @4akloon in #134
- update docs for v5 by @JarvanMo in #136
- Update All (major) by @renovate[bot] in #129
New Contributors
Full Changelog: 4.5.1...4.5.2
Release notes
Open source →- Fix validation to allow MAX UUID (
FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF) as it is valid. - Add
strictRFC9562and deprecatestrictRFC4122to facilitate a rename. This will be remove in v5
- Fix validation to allow MAX UUID (
-
4.5.126 Sep 2024Release notes
Open source →Changelog
- Add
UuidValue.fromNamespaceto let you make constant variants of the namespace, as due to language limitations on Enums,Namespace.*.uuidValuecan't be constant. - Added
isV#(),isNil(), andisMax()functions toUuidValuefor matching Dart standards.
Full Changelog: 4.5.0...4.5.1
Release notes
Open source →- Add
UuidValue.fromNamespaceto let you make constant variants of the namespace, as due to language limitations on Enums,Namespace.*.uuidValuecan't be constant. - Added
isV#(),isNil(), andisMax()functions toUuidValuefor matching Dart standards.
- Add
-
4.5.030 Aug 2024Release notes
Open source →Changelog
- Change to CryptoRNG by default, you will now need to use MathRNG explicitly if you want speed over security. (thanks @Rexios80)
- This also works around a regression in the Dart SDK on WASM targets: dart-lang/sdk#56609
- Deprecate the use of
Uuid.NAMESPACE*andUuidV5.NAMESPACE, and switch to using a proper const enum for this. (thanks @bymoye)- These will be removed once sufficient time has been made for the deprecation notice to be seen. Most likely v5.0.
- Please use the new
Namespaceenum inenums.dart.
- Re-add
Uuid.NAMESPACE*andUuidV5.NAMESPACEin order to give deprecation time. - Add missing MAX UUID option from RFC9562
- Add
bytesgetter toNamespaceenum. - [PARTIAL BREAKING CHANGE]
Namespaceis now an enum, and the entries are now of theNamespacetype. They all have avaluefunction to return the internalstring
What's Changed
- remove multiple individually defined Namespaces and use enumerations instead by @bymoye in #122
- Always use
CryptoRNGas the default by @Rexios80 in #126
New Contributors
Full Changelog: 4.4.2...4.5.0
Release notes
Open source →- Change to CryptoRNG by default, you will now need to use MathRNG explicitly if you want speed over security. (thanks @Rexios80)
- This also works around a regression in the Dart SDK on WASM targets: https://github.com/dart-lang/sdk/issues/56609
- Deprecate the use of
Uuid.NAMESPACE*andUuidV5.NAMESPACE, and switch to using a proper const enum for this. (thanks @bymoye)- These will be removed once sufficient time has been made for the deprecation notice to be seen. Most likely v5.0.
- Please use the new
Namespaceenum inenums.dart. - These will be removed in v5
- Re-add
Uuid.NAMESPACE*andUuidV5.NAMESPACEin order to give deprecation time. - Add missing MAX UUID option from RFC9562
- Add
bytesgetter toNamespaceenum. - [PARTIAL BREAKING CHANGE]
Namespaceis now an enum, and the entries are now of theNamespacetype. They all have avaluefunction to return the internalstring
- Change to CryptoRNG by default, you will now need to use MathRNG explicitly if you want speed over security. (thanks @Rexios80)
-
4.4.211 Jul 2024Release notes
Open source →- Revert meta depenency version upgrade, was breaking flutter_test. (thanks @techouse)
-
4.4.110 Jul 2024Release notes
Open source →v4.4.1
- Fix UUIDv1 to use millisecondsSinceEpoch instead of microsecondsSinceEpoch. Matches UUIDv6 and passes vector tests. (#119)
What's Changed
- Update renovate.json by @daegalus in #114
- Update All (major) by @renovate in #115
- Update dependency lints to v4 by @renovate in #116
New Contributors
Full Changelog: 4.4.0...4.4.1
Release notes
Open source →- Fix UUIDv1 to use millisecondsSinceEpoch instead of microsecondsSinceEpoch. Matches UUIDv6 and passes vector tests.
-
4.4.008 Apr 2024Release notes
Open source →- Fix MathRNG with Seed being recreated on each use, generating the same list of bytes. (thanks @showband)
- Fix UUIDv5 UTF8 inconsistencies. (thanks @vjamrich)
- Use static state storage for random number generator to prevent MathRNG issue.
- Replace V1, v6, V7, V8 MathRNG preventively, the issue didn't exhibit there due to other factors in the UUID generation (primarily time, and clockseq)
What's Changed
- fixed MathRNG - it now uses the initial seed properly by @showband in #109
- Fix V5 UUID inconsistencies when using UTF-8 characters by @vjamrich in #112
New Contributors
Full Changelog: 4.3.3...4.4.0
Release notes
Open source →- Fix MathRNG with Seed being recreated on each use, generating the same list of bytes. (thanks @showband)
- Fix UUIDv5 UTF8 inconsistencies. (thanks @vjamrich)
- Use static state storage for random number generator to prevent MathRNG issue.
- Replace V1, v6, V7, V8 MathRNG preventively, the issue didn't exhibit there due to other factors in the UUID generation (primarily time, and clockseq)
-
4.3.311 Jan 2024Release notes
Open source →v4.3.3
- Fix UUIDv7 in Javascript
- Using bitshifts on anything over 32bits get truncated. Switched to a more naive solution for now. Hopefully dart2wasm fixes things.
- Remove unnecessary
_randomData()functions - Add
fixnumpackage to handle issues in v6, time, and javascript.
Full Changelog: 4.3.2...4.3.3
Release notes
Open source →- Fix UUIDv7 in Javascript
- Using bitshifts on anything over 32bits get truncated. Switched to a more naive solution for now. Hopefully dart2wasm fixes things.
- Remove unnecessary
_randomData()functions - Add
fixnumpackage to handle issues in v6, time, and javascript.
- Fix UUIDv7 in Javascript
-
4.3.210 Jan 2024Release notes
Open source →- Added
toFormattedString()toUuidValueto handle cases where the UUID used has no hyphens but you wnt them for output. - Changed constraint for
metato1.10.0to not conflict withflutter_test
Full Changelog: 4.3.1...4.3.2
Release notes
Open source →- Added
toFormattedString()toUuidValueto handle cases where the UUID used has no hyphens but you wnt them for output. - Changed constraint for
metato1.10.0to not conflict withflutter_test
- Added
-
4.3.112 Dec 2023Release notes
Open source →- Add additional optional parameters for parseing and validation for the new noDashes flag.
-
4.3.012 Dec 2023Release notes
Open source →- Update SDK constraints to >= 3.0.0
- Update Meta package to 1.11.0
- [PARTIAL BREAKING CHANGE] Changing MathRNG implementation to use 4 nextints, instead of 16 for optimization to match CryptoRNG. This will affect regenerating the same UUID from the same seed.
- If you need the old behavior, please use MathRNGDeprecated() instead.
-
4.2.212 Dec 2023Release notes
Open source →- Fix CryptoRNG on Web generating a random number 0 always
- Add NoDashes support to the validator so that it validates UUIDs that don't have dashes but are otherwise valid.
-
4.2.107 Nov 2023Release notes
Open source →- Lower
metadependency to 1.9.1 so that it is compatible with Flutter Stable 3.13
- Lower
-
4.2.006 Nov 2023Release notes
Open source →- [BREAKING CHANGE] Deprecate default/empty
UuidValueconstructor because it has a different behavior from the 3.x package version. (Thanks @davidmartos96)- Use
UuidValue.fromString()instead, which has the same behavior. If you need to define a constUuidValueyou can useUuidValue.raw(), but making sure the value is lowercase.
- Use
- Mark
UuidValueas experimental with an annotation. (Thanks @Kaival-Patel)
- [BREAKING CHANGE] Deprecate default/empty
-
4.1.025 Sep 2023Release notes
Open source →- [BREAKING CHANGE] In order to enforce lowercase strings in
UuidValue, I have made the default const constructor private, and added afromStringfactory constructor. Please migrate any directUuidValue()usage toUuidValue.fromString()orUuidValue.withValidation().
- [BREAKING CHANGE] In order to enforce lowercase strings in
-
4.0.030 Aug 2023Release notes
Open source →- toBytes on UuidValue now does not validate by default, but has the option
validatethat can be set to true if you need validation when calling it. (Thanks @Erhannis)
- toBytes on UuidValue now does not validate by default, but has the option
-
4.0.0-beta3-106 Apr 2023 pre-releaseNothing published for this version
-
4.0.0-beta305 Apr 2023 pre-releaseRelease notes
Open source →- [BREAKING CHANGE] Replacing UuidUtil rng functions with RNG classes.
- UuidUtil.mathRNG() is replaced with MathRNG().generate().
- UuidUtil.cryptoRNG() is replaced with CryptoRNG().generate().
- Custom crypto implementations just need to implement the
RNGabstract class. - namedArgs and positionalArgs have been removed from GlobalOptions
- You may use LegacyRNG() if you need to use the old function style RNG.
- Fix a bug with the usage of Uint64List in Dart2js by not using it. (Thanks @hambergerpls)
- [BREAKING CHANGE] Replacing UuidUtil rng functions with RNG classes.
-
4.0.0-beta231 Mar 2023 pre-releaseRelease notes
Open source →- [BREAKING CHANGE] The
Uuidclass now takes aGlobalOptionsclass instead of aMap<String, dynamic>. - Added options classes to eventually replace the Map parameter.
- [BREAKING CHANGE] Since v6,v7,v8 are new for 4.0, I have made it so they only take the new options class.
- Reworked the constructors, and moved state out of the classes. Const is now supported properly again
- Switched tests to use const Uuid to catch regressions.
- Set the
optionsparameter in v1, v4, and v5 to deprecated. - [BREAKING CHANGE] Make UuidValue properly const also
- Can no longer run validation on the const variant.
- Added UuidValue.withValidation() to handle this usecase, it can't be const.
- If you need const and validation. Create the UuidValue with the UUID, then call the
validate()function on it.
- [BREAKING CHANGE] The
-
4.0.0-beta1-113 Nov 2022 pre-releaseNothing published for this version
-
4.0.0-beta113 Nov 2022 pre-releaseRelease notes
Open source →- Break up versions into individual objects that can be used standalone.
- No more colliding global states between versions
- Added UUID v6, v7, v8 from the new RFC.
- Add
time,version, andvariantfunctions to UuidValue
-
3.0.713 Nov 2022Release notes
Open source →- Fixed parse to allow buffers larger than 16 bytes to be used. [Thanks @hoylen]
-
3.0.619 Feb 2022Release notes
Open source →- Enable
avoid_dynamic_callslinting and fix appropriately. (Thanks @devoncarew)
- Enable
-
3.0.505 Oct 2021Release notes
Open source →- Global options were incorrectly being ignored. #76 (Thanks @Skycoder42)
- V4 Global Options were incorrectly named. #76 (Thanks @Skycoder42)
- Global state was static, not per instance. #76 (Thanks @Skycoder42)
- Additional tests to make sure the above doesn't regress. #76 (Thanks @Skycoder42)
-
3.0.407 Apr 2021Release notes
Open source →isValidUUIDnow handles some Microsoft GUIDs better that only deviate in the Variant setting. (Thanks @FluentChange)- Improve error output so that it better explains how to handle the above change in your code if you encounter it. (Thanks @FluentChange)
- Improve validation logic to better handle multiple validation cases, error output, and feedback to developers. (Thanks @FluentChange)
-
3.0.328 Mar 2021Release notes
Open source →- [Experimental] Fixed UuidValue to properly check things are valid. (Thanks @FlorianUlivi)
- [Experimental] Added new constructors
fromByteListandfromListtoUuidValue - [Experimental] Added
==operator override and hashcode override. (Thanks @giorgiofran for suggestion) - Added
parseAsByteListto offer a direct output toUint8List - [Experimental][BREAKING CHANGE] Change
toBytesinUuidValueto returnUint8Listinstead ofList<int> - [Experimental][BREAKING CHANGE]
isValidUuidfunction signature has changed, now takes 2 optional parametersfromStringandfromListthat will do the appropriate validation on different sources.
-
3.0.222 Mar 2021Release notes
Open source →- [Experimental] Add flags to UuidValue constructor and parse to disable validation of the UUID, primarily to allow Microsoft GUIDs to not break things.
-
3.0.101 Mar 2021Release notes
Open source →- Fix RNG to not need shuffling and improve performance/memory usage (Thanks @julemand101)
-
3.0.022 Feb 2021 -
3.0.0-nullsafety.114 Feb 2021 pre-releaseRelease notes
Open source →- [BREAKING CHANGE] Changed
parse()to throw a FormatException instead of returning NIL uuids or partially handled UUIDs. - Changed
Uuidconstructor to be constant, and adjusted all the code accordingly. - New
isValidUUIDfunction for validating UUIDs. - [BREAKING CHANGE]
parseandunparseare now static functions. - [Exprimental] Object version of the UUID instead of a string or list of bytes.
- [BREAKING CHANGE] Changed
-
3.0.0-nullsafety.021 Jan 2021 pre-releaseRelease notes
Open source →- Migrate package to null-safety, increase minimum SDK version to 2.12 (Thanks @simolus3)
v2.2.1 & v2.2.2
- Update pedantic analyzer options, fix linting issues, and increase SDK minimium to 2.2 to support set literals
-
2.2.228 Aug 2020Nothing published for this version
-
2.2.128 Aug 2020Nothing published for this version
-
2.2.003 Jul 2020Release notes
Open source →- fix v1 clock high to properly ignore c and d variants. (fixes #47)
- update example
-
2.1.013 Jun 2020Release notes
Open source →- Shuffle mathRNG bytes so that they don't generate duplicates. Will affect codes generated by a static seed.
-
2.0.414 Nov 2019Release notes
Open source →- Remove new keyword where not needed. (forgot to rerun before releasing 2.0.3)
-
2.0.314 Nov 2019 -
2.0.214 Jun 2019 -
2.0.103 Apr 2019Release notes
Open source →- Fix regression where CryptoRNG was default, moved back to MathRNG
- Added ability to set RNG globally to skip having to set it in every function call
- Allows you to set the v1 clock sequence, nodeID, and seed bytes to use cryptoRNG separately from globalRNG.
-
2.0.006 Feb 2019Release notes
Open source →- Fixup the API to split out Buffer and Non-buffer usages.
- Switch to build in Random.secure() and remove custom AES implementation.
- Less dependencies.
- Docs
- Cleanup
-
2.0.0-rc108 Dec 2018 pre-releaseNothing published for this version
-
1.0.307 Aug 2018 -
1.0.203 Aug 2018 -
1.0.112 Jul 2018 -
1.0.010 Apr 2018Release notes
Open source →- Cleanup and prep for dart 2.0
- Has been stable for a long time, upgrading to 1.0 version
-
0.5.304 Jun 2016 -
0.5.211 Apr 2016 -
0.5.131 Mar 2016 -
0.5.031 Dec 2014Release notes
Open source →- Reverted back to custom AES implementation. Moved RNG methods to UuidUtil (import 'package:uuid/uuid_util.dart')
- Fixed a potential bug with custom RNG method passing and added more ways to pass in custom RNG functions.
- Cleaned up and refactored some stuff. Using only v1 is only 67kb of js, Using only v4 is 97kb. Using crypt v4 is 118kb. Using both v1 and non-crypto v4 is 126kb.
- Default RNG for v4 is now the mathRNG function. If you wish to use cryptoRNG, import UuidUtil and pass in cryptoRNG.
- Updated README.md with more examples and usages.
- Updated Tests.
-
0.4.129 Sep 2014Release notes
Open source →- Changed initCipher location so that if you ever only use v1 UUIDs, you will get a very small Dart2JS output compared to v4 or v5 that do load it.
-
0.4.014 Aug 2014Release notes
Open source →- Use Cipher base.dart, as I don't need entropy generators, and this allows me to merge client/server together again and fix many issues this caused.
-
0.3.220 Apr 2014 -
0.3.111 Apr 2014 -
0.3.027 Feb 2014Release notes
Open source →- Updated to latest Cipher at 0.6.0. This created a breaking change in the imports. Please make sure you update your code.
- Fixed problem when creating v4 UUIDs too fast, it would create duplicate UUIDs.
-
0.2.219 Jan 2014 -
0.2.111 Nov 2013 -
0.2.009 Nov 2013 -
0.1.605 Jun 2013 -
0.1.505 Jun 2013