Random String & Password Generator

This free online random string generator creates passwords, API keys, tokens and test data. Choose from uppercase, lowercase, digits and special characters, set the length, and generate one string or a batch of up to 2000.

Select several character sets and every string is guaranteed to include at least one character from each, unless the prefix leaves too few characters. The result is then shuffled, so those characters are scattered rather than always landing first. Random values come from your browser's cryptographically secure generator with rejection sampling to remove modulo bias, falling back to Math.random if it is unavailable. Generation happens entirely in your browser — there is no server round-trip.

Options:

  • Quantity: how many strings to generate, up to 2000
  • Length: how many characters each string has, up to 2000
  • Uppercase: include A-Z
  • Lowercase: include a-z
  • Digits: include 0-9
  • Symbols: include special characters (!@#$%^&*()_+)
  • Prefix: put fixed text at the start of every string; it counts toward the length
  • Custom character sets: the field next to each set is editable; repeated characters are ignored, and leaving a selected field empty stops generation with a hint

FAQ:

  • Q: Will every string contain characters from every set I selected?
    A: Yes, provided the random part is at least as long as the number of sets you selected. One character from each set is added first, the rest are drawn at random, and the whole string is shuffled so the required characters are not stuck at the front. If the random part is shorter than the number of sets, the guarantee is dropped: with 4 sets, length 8 and a 6-character prefix, only 2 random characters remain, which cannot cover all 4 sets.
  • Q: Can I change the characters used, and why am I asked to fill in a set?
    A: The fields next to Uppercase, Lowercase, Digits and Symbols are all editable. Duplicate characters are removed, so typing one twice does not make it more likely to appear. If a set is checked but its field is empty, generation stops and asks you to fill it in; with all four unchecked, you are asked to select at least one.
  • Q: Does the prefix count toward the length?
    A: Yes. The prefix is copied unchanged to the start of every string and the random part fills the rest, so the total always matches the length you set. It must be shorter than the length, otherwise nothing is generated. The prefix is not random and does not have to use the selected character sets.
  • Q: How many strings can I generate, and does clicking Generate again append them?
    A: Quantity and length both go up to 2000, and empty or zero values are rejected. For more than 1000 strings, a brief "Generating" message appears first. Each run replaces the contents of the result box, so nothing is appended.
  • Q: What is the difference between Reset and Clear?
    A: Clear empties the result box only. Reset restores quantity, length, the four character sets and the prefix field to their defaults, but it does not clear the strings you already generated and it does not change which sets or the prefix are checked.
  • Q: Are my settings remembered, and can two strings be identical?
    A: The character sets, the prefix text and which sets are checked are saved in this browser; quantity and length are not, so a reload goes back to 1 and 10. Every string is drawn independently, so duplicates are possible in a large batch.

Common uses:

  • Strong passwords for accounts, Wi-Fi and admin panels
  • API keys, access tokens and one-time verification codes
  • Random IDs for orders, tickets and records
  • Test data for development and QA