# Token Generator

Generate random tokens and passwords of a chosen length and charset.

## URL

https://ilham.dev/tools/token-generator/

## What It Does

Generate random tokens and passwords of a chosen length from a chosen character set, drawn from the browser's cryptographic random source. Useful for API keys, session secrets and share links.

## Features

- Runs in the browser
- No login required

## Input

text input.

## Output

text output.

## Privacy

Processing happens locally in the browser.

No input data is uploaded to ilham.dev.

- Requires login: false
- Requires API key: false
- Stores user data: false


## Examples

- How long should a token be?
- Is Math.random good enough for this?




## Questions

### How long should a token be?

For a machine-generated secret, 32 characters from a mixed alphabet is about 190 bits of entropy, which is far past brute force. Length buys you more than character variety does.

### Is Math.random good enough for this?

No. Math.random is a fast seeded generator whose output can be predicted from previous values. This tool uses crypto.getRandomValues instead.

