Skip to content

In code

Generate a UUID in Rust

Add the uuid crate with the v4 feature.

Rust example

Rust
// uuid = { version = "1", features = ["v4"] }
use uuid::Uuid;

let id = Uuid::new_v4();

No install? Use the tool or API

Here's a fresh version 4 UUID generated right now — copy it, or call the API from any language.

9355436a-a05c-4365-b093-741996e5e3f3
curl https://getuuid.sh/api/uuid

Other languages

← Full API reference