Generate Token
Overview
Section titled “Overview”Generate Token is a minimal static web app that instantly generates a cryptographically random 16-character hexadecimal token on page load. It uses the browser’s built-in Web Crypto API — no server, no dependencies, no build step. Refresh the page to get a new token.
How It Works
Section titled “How It Works”The entire application lives in a single HTML file. On load, it requests 8 random bytes from window.crypto.getRandomValues(), converts each byte to a zero-padded hex string, and displays the resulting 16-character token:
const array = new Uint8Array(8);window.crypto.getRandomValues(array);const token = Array.from(array) .map(byte => byte.toString(16).padStart(2, '0')) .join('');This produces tokens like a3f1c9e07b2d4a86 — suitable for quick test IDs, session tokens during development, or any scenario where you need a random hex string fast.
Features
Section titled “Features”- Cryptographically Random — Uses
crypto.getRandomValues(), notMath.random() - Zero Dependencies — No npm packages, no frameworks, no build tools — just a single HTML file
- Instant Generation — Token is generated and displayed on page load, no clicks required
- Auto-Deploy — GitHub Actions workflow deploys to GitHub Pages on every push to
main
Tech Stack
Section titled “Tech Stack”| Language | HTML, JavaScript |
| API | Web Crypto API (crypto.getRandomValues) |
| Hosting | GitHub Pages |
| CI/CD | GitHub Actions |
Live Demo
Section titled “Live Demo”Try it out at jadujoel.github.io/generate-token.
Source Code
Section titled “Source Code”The source code is available on the project’s GitHub repository.