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.

ee977f3d-05eb-4b77-a2aa-0219e0791524
curl https://getuuid.sh/api/uuid

Other languages

← Full API reference