Developer UUID tools

Ruby UUID Generator

Generate UUIDs for Ruby apps, tests, fixtures, and scripts, then review SecureRandom.uuid examples.

Ruby UUID generator

Create UUID values for Ruby fixtures, Rails seeds, migrations, and API examples.

123e4567-e89b-42d3-a456-426614174000
123e4567-e89b-42d3-a456-426614174001
123e4567-e89b-42d3-a456-426614174002
123e4567-e89b-42d3-a456-426614174003
123e4567-e89b-42d3-a456-426614174004
123e4567-e89b-42d3-a456-426614174005
123e4567-e89b-42d3-a456-426614174006
123e4567-e89b-42d3-a456-426614174007
123e4567-e89b-42d3-a456-426614174008
123e4567-e89b-42d3-a456-426614174009
Output options

Generate 1 to 1000 IDs per batch.

Generated values stay in your browser. This page does not send UUIDs or GUIDs to a server for generation.

Ruby SecureRandom.uuid example

Ruby includes SecureRandom.uuid for generating random UUID strings.

Generate a UUID in Ruby
require "securerandom"

id = SecureRandom.uuid
puts id

Generate multiple UUIDs

Use a loop or Array.new when you need UUIDs for seed data or tests.

Multiple Ruby UUIDs
ids = Array.new(10) { SecureRandom.uuid }
puts ids

Validation note

Validate external UUID strings with a parser or a strict regex before storing them as identifiers.

FAQ

How do I generate a UUID in Ruby?+

Require securerandom and call SecureRandom.uuid.

Is SecureRandom.uuid a UUID v4?+

It generates a random UUID string suitable for typical UUID v4 workflows.

How do I create many UUIDs in Ruby?+

Use Array.new(count) { SecureRandom.uuid } for a bounded batch.