Toolivaro

Gerador de UUID grátis

Gere UUIDs versão 4 conforme RFC 4122 a partir de aleatoriedade criptograficamente segura — um de cada vez ou em lote, tudo local.

O gerador de UUID produz identificadores únicos universais versão 4 conforme RFC 4122, a partir de aleatoriedade criptograficamente segura — o getRandomValues da plataforma, a mesma fonte que seu runtime usa para identificadores seguros. Gere um UUID com um clique, ou até 100 de uma vez para fixtures, dados de semente ou suítes de teste; alterne entre saída minúscula ou maiúscula e entre forma com ou sem hífens, e copie um único valor ou o lote inteiro. Cada valor gerado é validado contra os bits de versão e variante antes de ser exibido, e o gerador também valida qualquer UUID que você colar — verificando a forma, o nibble da versão 4 e os bits de variante da RFC, e não apenas o padrão de hífens. O método é mostrado abertamente: 122 bits aleatórios com os campos de versão e variante fixos, exatamente como especifica a seção 4.4 da RFC 4122. Tudo roda localmente: nenhum valor que você gerar ou validar é enviado, registrado ou armazenado. Use esta ferramenta para dados de teste, chaves de banco de dados, identificadores de eventos ou qualquer lugar em que um UUID v4 seja necessário e você queira que a aleatoriedade venha da fonte criptográfica da plataforma, em vez de um serviço web compartilhado.

Processado localmente no seu navegador

1–100 por lote.

Formato

Como usar esta calculadora

What a UUID is for, and what version 4 means

A universally unique identifier is a 128-bit value designed for one job: naming things without a central registry. Databases, message queues, event systems, and test suites all use them because a value can be generated anywhere — on any machine, offline, in a script — and still be treated as unique without asking a server for the next number. Version 4 is the random variant: of the 128 bits, 122 come from a random source and 6 are fixed by the format — the version nibble (hex 4) in the third group and the variant bits (the first hex digit of the fourth group, always 8, 9, a, or b). That is why every v4 UUID shows the same tell-tale pattern, 8-4-4-4-12: 7f3a9c21-4d2e-4b8a-9c1e-2f3a4b5c6d7e. The fixed bits are not a bug; they are how a reader can tell a v4 from a time-based v1 or a name-based v3 without any extra information.

The randomness is not from a generic random function but from the platform’s cryptographically secure source, getRandomValues — the same generator your runtime uses for secure tokens and TLS session keys. That matters because identifier collisions are most likely when the random source is weak or predictable: Math.random(), the classic offender, is not designed for this job and is never used here.

Generating identifiers for fixtures and test data

The generator produces one UUID per click or a batch of up to 100 in a single action — enough for a seed-data file, a test fixture, or a set of event ids in a staging run. Output can be lowercase or uppercase (hex is case-insensitive; the choice is purely cosmetic) and hyphenated or hyphenless. Hyphenless forms are convenient when a value is embedded in a filename or a context that treats hyphens specially; hyphenated is the conventional form that matches RFC 4122 and most documentation. Because the version and variant digits are always visible, a hand-typed fake — one where someone edited a real id — is usually easy to spot: the 4 in the third group and the 8/9/a/b start of the fourth group are the first things to check.

The page validates every generated value against the format before showing it, so a batch cannot silently contain a malformed entry. For test fixtures, generate once and reuse the values; there is no need to regenerate per run, and deterministic fixtures are easier to debug than fresh values on every execution.

Using the validator on values from elsewhere

The same page validates any UUID you paste. The check is stricter than a glance at the dash pattern: it verifies the shape (8-4-4-4-12 hex groups), the version nibble (a 4 in the third group), and the RFC variant bits (8, 9, a, or b at the start of the fourth group). A string with the right dashes but the wrong version — a v1 or v3 UUID, or a value that merely looks the part — is correctly rejected. This matters more than it sounds: many systems accept any 8-4-4-4-12 string as a v4 UUID, and subtle bugs follow when a time-based id is later treated as random.

What the validator does not do is check whether a UUID exists anywhere — it cannot, and no tool can: uniqueness is probabilistic, not registered. If your system needs to know whether an id is already in use, the database is the authority, not the format check.

Uniqueness, randomness, and the honest limits

No generator can guarantee uniqueness. Version 4 provides 122 random bits, so the probability of a collision is astronomically small — roughly one in 2^61 for a batch of two billion values — but it is not zero, and the tool says so rather than promising certainty. For practical purposes the guarantee comes from the random source: with getRandomValues, consecutive values share no predictable pattern, which is the property that makes v4 useful in the first place.

One distinction worth keeping straight: a UUID is an identifier, not a secret. Its structure is public, it is not designed for authenticated access, and the RFC does not treat it as a credential. If you need a value that protects access — a reset token, an API key, a password — use a dedicated secret generator instead, and store it where secrets belong.

Como o resultado é calculado?

Três fixtures de teste

Gere três UUIDs para dados de semente. Cada valor tem o nibble da versão 4 (um 4 no terceiro grupo) e os bits de variante (8, 9, a ou b iniciando o quarto grupo), por exemplo, 7f3a9c21-4d2e-4b8a-9c1e-2f3a4b5c6d7e — o padrão é visível de relance, então um falso digitado à mão é fácil de perceber.

Exemplo de entrada e saída
Entrada Valor
count 3
format lowercase, hyphenated
Resultado 3 UUIDs v4 válidos conforme RFC 4122, cada um verificado quanto aos bits de versão e variante

Qual é a fórmula e suas premissas?

Construção da versão 4

uuid = 122 random bits, with version = 0100 and variant = 10 fixed

Termos da fórmula
Símbolo Significado
version o nibble alto do terceiro grupo fixado em 4
variant os dois bits altos do quarto grupo fixados em 10

A aleatoriedade vem do getRandomValues criptograficamente seguro da plataforma.

Quais são os erros mais comuns?

  • Usar Math.random() para identificadores — ele não é criptograficamente seguro; esta ferramenta usa getRandomValues.
  • Aceitar qualquer string 8-4-4-4-12 como UUID v4 — os bits de versão e variante também precisam corresponder.
  • Digitar UUIDs à mão para fixtures — um caractere errado e o valor é inválido.
  • Gerar identificadores em um servidor que os registra — esta ferramenta é totalmente local.

Quais são as premissas e limitações?

  • Apenas versão 4: a ferramenta gera e valida v4; v1, v3, v5 e o v7 ordenado por tempo não são suportados.
  • A geração em lote tem limite de 100 valores por lote para manter a página responsiva.
  • A unicidade é probabilística, não garantida — a ferramenta informa as probabilidades em vez de prometer unicidade absoluta.

De onde vêm os números?

Última revisão 5 de agosto de 2026 · Versão 1.0.0 · Toolivaro não garante conteúdo externo.

Perguntas frequentes

Por que meu UUID gerado sempre tem um 4 no terceiro grupo?

Esse é o campo de versão: a versão 4 da RFC 4122 fixa o nibble alto desse byte em 0100 (hexadecimal 4). Todo UUID v4 válido mostra isso — não é um bug, é o formato.

Dois UUIDs gerados têm garantia de serem diferentes?

Nenhum gerador pode garantir unicidade — o v4 oferece 122 bits aleatórios, então colisões são astronomicamente improváveis (cerca de 1 em 2^61 para dois bilhões de valores), mas não impossíveis. A ferramenta usa a aleatoriedade criptográfica da plataforma, a fonte mais forte disponível no navegador.

O que o validador verifica?

A forma (grupos hexadecimais 8-4-4-4-12), o nibble da versão 4 e os bits de variante da RFC. Uma string com o padrão de hífens certo, mas a versão errada — como um UUID v1 ou v3 — é corretamente rejeitada.

Can I use a v4 UUID as a password or access token?

No — treat UUIDs as identifiers, not secrets. The format is public, the value is not stored as a credential, and the RFC does not define it for authentication. Use a dedicated secret generator (like the password generator) for anything that gates access.

Are uppercase and lowercase UUIDs different values?

No. Hex digits are case-insensitive, so 7F3A9C21-… and 7f3a9c21-… are the same value. The tool normalizes output to whichever case you pick so the choice is a formatting preference, not a data difference.

Parte de Ferramentas de senhas, hash e segurança

Encontrou um erro ou tem uma correção? Informe — revisamos toda correção.

Foi útil?

Revisado pela equipe editorial da Toolivaro conforme nossa metodologia Metodologia · Política editorial