Gerador de Strings Aleatórias — Calculadora Online Grátis
Generate random strings for testing, tokens and security applications
The Random String Generator creates cryptographically random strings of any length using a configurable character set — letters, digits, symbols, or any custom mix. Developers use it to generate API keys, session tokens, test data seeds, temporary passwords, and unique identifiers without writing throwaway scripts or reaching for a UUID library.
Frequently Asked Questions
Sobre Esta Calculadora
"Random" strings generated with Math.random() or similar non-cryptographic functions are predictable — if an attacker knows the seed or timing, they can reproduce the sequence. For anything security-sensitive, cryptographically secure randomness (CSPRNG) is required, which this generator uses via the browser's Web Crypto API.
The character set composition directly controls the entropy per character: using only digits (10 chars) gives 3.32 bits per character, while using all printable ASCII (95 chars) gives 6.57 bits. For a given security requirement in bits, you can either use a larger character set or increase the length — the tradeoffs are shown alongside every generated string.
Typical use cases include generating one-time tokens for email verification links, creating test fixtures with realistic-looking but meaningless data, generating webhook secrets, producing random slugs for URL shorteners, and creating initial passwords that users must change on first login.
O Gerador de Strings Aleatórias cria chaves criptograficamente seguras com os caracteres que você definir.
Exemplo Resolvido
Generating a 32-character API token with high entropy
Entradas:
- Length: 32 characters
- Character set: uppercase + lowercase + digits (62 characters total)
Passo a Passo:
- Entropy per character = log₂(62) ≈ 5.95 bits
- Total entropy = 32 × 5.95 = 190.4 bits
- At 10^12 guesses/second: 2^190 / 10^12 ≈ 10^45 years to brute force
- Generated token (example): kR9mXp2Lw7TnQdAu4sFjHbVeZy1CgN6o
- Each generation uses crypto.getRandomValues() — not Math.random()