TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Generate a random string

GEThttps://api.testingapis.com/api/utils/random/stringSign in to see this endpoint's URL

Parameters 3

NameTypeDescription
lengthquery · integer (int32)Length, 1–1000, default 16. Default: 16.
charsetquery · stringalphanumeric (default), alpha, numeric, hex or symbols. Case-insensitive. Default: "alphanumeric".
seedquery · integer (int32)Optional seed for repeatable output.

Responses

200
Success.
400
length is out of range or the charset is unknown.

Example

Request
curl -X GET "https://api.testingapis.com/api/utils/random/string?length=12" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{"value": "xbSPTfUubaO3", "length": 12, "charset": "alphanumeric", "seed": null}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.