Z

Generators

Nine tools that produce something from a specification instead of transforming a file you already have: secrets, machine-readable codes, random numbers and color values. The password, passphrase and random-number tools draw on crypto.getRandomValues, the browser’s cryptographically secure generator, never Math.random.

Which generator do I need?

  • A secret — the password generator builds a random character string for a password manager to remember on your behalf. The passphrase generator strings random words together, which is what you want for the handful of secrets you have to type from memory, such as a disk or vault password.
  • A scannable code — the QR code generator encodes a URL, Wi-Fi login, phone number or plain text, and phones act on the content type when they scan it. The barcode generator produces CODE128 for internal labels and EAN-13 or UPC for retail product numbers issued through GS1.
  • A number — the random number generator draws from a range, optionally without repeats, for sampling and informal picks. The percentage calculator answers the three percentage questions people actually ask: X percent of Y, what percent one number is of another, and percentage change.
  • A color or gradient — the CSS gradient generator emits a ready declaration you can paste into a stylesheet, the color converter moves a value between HEX, RGB and HSL, and the contrast checker scores a foreground and background pair.

Where the randomness comes from

The password, passphrase and random-number tools all call crypto.getRandomValues, the Web Crypto generator seeded from entropy your operating system collects. Math.random is never used: it is a fast pseudo-random function whose future output becomes predictable once its internal state is known — acceptable for a shuffle animation, unacceptable for anything that guards an account.

Cryptographically secure is not the same as certified, though. A licensed lottery, raffle or regulated prize draw needs hardware audited by a gaming authority and a tamper-evident record of every draw. Nothing generated in a browser tab can supply that, so use these tools for passwords, test data, sampling and casual picks — not for outcomes with legal or financial consequences.

Contrast, in numbers

WCAG 2 sets three thresholds and the contrast checker reports which of them a pair clears: 4.5:1 for normal body text at level AA, 3:1 for large text (roughly 18pt, or 14pt bold) at AA, and 7:1 for normal text at AAA. Seeing the actual ratio is what makes the tool useful — a brand color that fails at body size but passes for headings shows up as exactly that, rather than a single pass or fail verdict.

Frequently asked questions

Password or passphrase — which should I use?
Use a long random password for everything a password manager fills in for you, since length and character variety cost you nothing there. Use a passphrase for the few secrets you must type by hand, because random words are far easier to remember and retype accurately than random characters at the same strength.
Can I use the random number generator for a public prize draw or lottery?
Not for a regulated one. The output is cryptographically secure, but a licensed draw also needs certified hardware, an audit trail and independent verification that a web page cannot provide. It is well suited to informal picks, sampling, assigning test data and settling arguments.
Which barcode type should I pick?
CODE128 unless something dictates otherwise — it encodes any ASCII text and produces the most compact symbol for mixed content, which suits internal labels and asset tags. EAN-13 and UPC are only for retail product numbers assigned through GS1; generating one for a number you invented will not make it scan correctly at a till.
Why will my QR code not scan?
Usually density or size: too much text packed into a code printed small. Other common causes are trimming the white quiet zone around it, which is part of the code, and low contrast from tinting it with brand colors. Encode a shortened URL instead of a long one, print it larger, and keep it dark on light.
What contrast ratio do I actually need?
For normal body text, 4.5:1 meets WCAG AA, which is the level most accessibility policies and procurement rules reference. Large text can drop to 3:1. Aim for 7:1 only if you are targeting AAA. Ratios below 3:1 are hard to read for many people in bright light, whatever the text size.