Skip to content

In code

Generate a UUID in Go

The google/uuid module is the de-facto standard.

Go example

Go
import "github.com/google/uuid"

id := uuid.New().String()

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.

004140ac-ea8c-4908-b503-85823beaaf50
curl https://getuuid.sh/api/uuid

Other languages

← Full API reference