A collection of minimal, dependency-free generators for developers, testers, and AI builders.
Generators provides fast, auditable modules for creating random or structured content — passwords, fake data, prompts, datasets, colors, and more — without large dependencies or opaque APIs. Each module is designed for portability, reproducibility, and simplicity.
Available modules:
generate-avatar — SVG avatar and placeholder generator with initials or geometric patterns
generate-card-number — Valid Luhn-compliant card number generator with realistic expiry and CVC for testing.
generate-color — Random or deterministic color palette generator (HEX, RGB, HSL)
generate-dataset — Generate structured JSON, JSONL, or CSV datasets for model fine-tuning or testing.
generate-fake-data — Seedable, dependency-free fake data generator.
generate-hash — Cryptographic and legacy hash generator (SHA-256, MD5) for text inputs.
generate-lorem — Deterministic Lorem Ipsum text generator for placeholders, tests, and AI datasets.
generate-password — Cryptographically secure password generation (or seeded, non-secure test fixtures).
generate-phone-number — US phone number generator with state filtering, city filtering, and bulk generation.
generate-prompt — Template-based AI prompt generator for text, code, and image models.
generate-slug — Unicode-aware title-to-slug helper with optional length limit. Module
generate-ssn — Synthetic US Social Security number generator for fixtures and test data only.
generate-token — Cryptographically secure token and UUID generator for authentication, API keys, and identifiers.
All helpers are designed for use in:
Modules can be imported independently. Browser demos and a dependency-free Node regression suite are included.
You can try each generator interactively in your browser:
Each page loads its respective module and allows interactive validation.
Import individual ESM modules directly; no build step or dependency installation is required.
To run the regression tests with Node.js 22+:
node --experimental-default-type=module --test tests/*.test.mjs
Metric badge workflows are manually dispatched, avoiding routine commits. Regression tests run automatically on PRs and pushes.
generatePassword() and generateToken() require crypto.getRandomValues without a seed and throw when secure randomness is unavailable. Run only in environments with Web Crypto.seed produces predictable test data. Never use seeded passwords or tokens as real credentials or secrets.length); disable-all-charsets is invalid for passwords.generateSlug() converts titles to Unicode-preserving slugs; it does not guarantee uniqueness or ASCII-only URLs.generateHash() supports sha-256 and md5. MD5 is legacy and unsuitable for password storage or security-sensitive integrity.generatePalette() rejects out-of-range RGB/HSL values. Fake contact details and card numbers are for tests only.import { generatePassword } from './generate-password/password.js';
import { generateToken } from './generate-token/token.js';
import { generatePalette } from './generate-color/color.js';
import { generateHash } from './generate-hash/hash.js';
import { generateSlug } from './generate-slug/slug.js';
import { generatePhoneNumbers } from './generate-phone-number/phone.js';
import { generateCard } from './generate-card-number/card.js';
import { rows, rng } from './generate-fake-data/fake.js';
console.log(generatePassword({ length: 20 })); // secure random password
console.log(generateToken({ type: 'hex', length: 32 })); // secure random token
console.log(generateToken({ type: 'uuid', seed: 'test' })); // predictable fixture only
console.log(generatePalette({ base: '#3366ff', count: 3 }).colors);
console.log(await generateHash('hello', 'sha-256'));
console.log(generateSlug('Café déjà vu!')); // 'cafe-deja-vu'
console.log(generatePhoneNumbers({ state: 'CA', count: 2, seed: 'test' }));
console.log(generateCard({ brand: 'visa', seed: 'test' })); // simulated test card
console.log(rows(2, 'test'));
generators/
├─ .github/
│ ├─ workflows/
│ └─ FUNDING.yml
├─ LICENSE
├─ README.md
├─ SECURITY.md
├─ package.json
├─ scripts/
│ └─ bench.mjs
├─ generate-avatar/
├─ generate-card-number/
├─ generate-color/
├─ generate-fake-data/
├─ generate-hash/
├─ generate-lorem/
├─ generate-password/
├─ generate-phone-number/
├─ generate-prompt/
├─ generate-slug/
├─ generate-ssn/
└─ generate-token/
Pull requests for small, standalone generators are welcome. Please maintain the following rules:
Licensed under the MIT License — see LICENSE.
If you find this project useful, please consider sponsoring its continued maintenance and security audits.
You can sponsor this project through:
.github/FUNDING.yml© 2025 Y Consulting LLC / Validators Project