Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

249
Vistas
UUIDv6, v7, v8 in Javascript (Browser)

I have been trying to find Javascript solutions for generating UUIDs in the browser. The ones I have found generate UUIDs following the version 4 standard.

Example:

function uuidv4() {
  return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
    (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
  );
}

console.log(uuidv4());

or even

let uuid = self.crypto.randomUUID();
console.log(uuid);

Are the other versions impossible to generate in the browser because they use MAC addresses (and those are inaccessible in JS due to privacy concerns)?

As I understand it, V6 is mostly UUIDv1 with some reordering (Draft), so it's not possible to use either. But how about V7 and V8? Is there an aspect preventing online (client-side) use? Or could the V4 code be adapted to produce those?

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda