URL Safe Random
Generate and inspect ID/random/timestamp values in your browser. No input is sent to a server. Use it for first-pass spec compliance checks.
Status
Runs in your browser. No input is sent to a server. Use this as a first-pass diagnostic step.
How to use
Set length and allowed characters, then click Generate. For URL or cookie use, tune settings to destination limits.
Notes (this tool)
- Generation uses cryptographic randomness (Web Crypto).
- If your app restricts characters, align the allowed set before using generated values.
About this page
What does this tool do?
Generate random strings using characters safe for URLs and filenames.
Useful for short IDs or temporary tokens.
Typical use cases
- Random strings for URL paths or filenames
- Create short temporary tokens
- IDs when symbols should be avoided
Recommendations (practical)
- Increase length by collision risk for temporary IDs (for example 16→24→32)
- For human-shared URLs, remove ambiguous chars (O/0, l/1) to reduce handling mistakes
- For auth-token use, always pair with server-side expiry and revocation control
What this tool does
- Generate URL-safe chars (a-zA-Z0-9-_)
- Control length and character sets
- Use cryptographic randomness
Notes
- This tool targets safe character sets, not signed tokens or key material generation.
- For sensitive values, consider browser history and clipboard exposure risks.
Debugging workflow (recommended)
- Generate or paste a value
- Check format, timestamp, and character constraints
- Confirm against destination validation requirements
Referenced specs
- RFC 3986 (URI unreserved characters)
- Web Crypto API (getRandomValues)
FAQ
What is the difference between URL Safe Random and Base64URL?
Both use URL-friendly characters, but this tool focuses on adjustable random strings by length and allowed charset.
How long should generated values be?
It depends on use case. For shareable IDs, 16–24 chars is common; for reset/reissue tokens, start around 24–32+ and tune by collision tolerance.
References
Next to view (diagnostic order)
These links are generated from site_map rules in recommended diagnostic order.
- Cookie Security Audit — Audit Secure/HttpOnly/SameSite settings
- Password Seed Generator — Derive reproducible passwords from seed and constraints
- Password Policy Generator — Create policy text and validation regex from requirements
- Random Password — Generate random passwords with length, charset, and exclusion options
Example
Qm9d3mKjXg4L-1tYc0_a