跳到主要内容
Z

How to Generate a UUID (v4)

Generate a random UUID (v4) instantly in your browser — step by step, with a free UUID generator.

A UUID is a 128-bit unique identifier. Generating a random version-4 UUID takes a second:

  1. 1

    Open the UUID generator

    Open the UUID generator tool.

  2. 2

    Generate

    A version-4 (random) UUID is produced instantly. Generate as many as you need.

  3. 3

    Copy it

    Copy the UUID and paste it into your code, database or config.

Do it now

常见问题

我可以使用哪些 dot-path?

任何位于 <code class="font-mono text-xs">faker.*</code> 下的路径都可以——例如 <code class="font-mono text-xs">person.firstName</code>、<code class="font-mono text-xs">company.name</code>、<code class="font-mono text-xs">finance.iban</code>、<code class="font-mono text-xs">date.past</code>。完整列表请参阅 faker.js 官方文档。

可以传入参数吗?

可以——在括号中放入参数对象即可。例如:<code class="font-mono text-xs">number.int({min:1,max:100})</code> 或 <code class="font-mono text-xs">helpers.arrayElement(["a","b","c"])</code>。

这些数据来自哪里?

一切都在你的浏览器中运行——faker.js 在本地生成数据,不会发起任何 API 调用。你的 schema 和数据永远不会离开你的设备。