Skip to content

Generate a v4 UUID

GET
/uuid/v4

Parameters

Query Parameters

format

An optional format to use for the UUID. If not provided, the default format (hyphenated) will be used.

Typestring
Enumhyphenated, simple, urn, braced

Responses

The generated UUID
string

Samples

cURL
curl -X GET https://httpbin.rs/uuid/v4
JavaScript
fetch("https://httpbin.rs/uuid/v4")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("https://httpbin.rs/uuid/v4");
Python
import requests
response = requests.get("https://httpbin.rs/uuid/v4")
print(response.json())
Powered by VitePress OpenAPI