Generate a Secure Password Online

An online password generator to create a random password.

Customize your password

Leaked Password Checker

Check whether your password has been hacked online.
  • Firefox Monitor
    Enter an email address to search for whether your email address is included in the public data leakage since 2007.
  • Google Password Manager
    Log in to Google's account and visit the following link for password security check to know whether the passwords you saved in Google's account are safe, whether these passwords have been leaked, what the security factor is, and whether you have reused some passwords.
  • Have I Been Pwned
    Enter your email address to check if your account will be compromised by data breach.

Generate Random Password in Programming Language

  • Generate random string in js/javascript/typescript (sandbox)
    const getRandomString = (size) => {
      const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890';
      const charactersLength = characters.length;
      let password = '';
      for (let i = 0; i < size; ++i) {
        password += characters[Math.floor(Math.random() * charactersLength)];
      }
      return password;
    }
    
    console.log(getRandomString(30));
  • Generate random string in Java (sandbox)
    public class MyProgram {
      static String getRandomString(int size) {
          String AllCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
          StringBuilder sb = new StringBuilder(size);
          int length = AllCharacters.length();
          for (int i = 0; i < size; i++) {
              sb.append(AllCharacters.charAt((int)(length * Math.random())));
          }
          return sb.toString();
      }
    
      public static void main(String[] args) {
          System.out.println(MyProgram.getRandomString(30));
      }
    }
  • Generate random string in Python (sandbox)
    import string
    import random
    
    def random_string(size):
      res = ''.join(random.choices(string.ascii_uppercase + string.ascii_lowercase + string.digits, k=size))
      return str(res)
      
    print("random string = " + random_string(30))
    
  • Generate random string in Rust (sandbox)
    fn main() {
      use rand::Rng;
      const CHARSET: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
      const LENGTH: usize = 30;
      let mut rng = rand::thread_rng();
      let password: String = (0..LENGTH)
          .map(|_| {
              let i = rng.gen_range(0..CHARSET.len());
              CHARSET[i] as char
          })
          .collect();
      println!("{:?}", password);
    }
  • Generate random string in bash shell (zsh)
    cat /dev/urandom | base64 | tr -dc '0-9a-zA-Z' | head -c30

Password Security Issues

On the Internet, websites are attacked by hackers every day, and user data is stolen. These data usually include user name, password (encrypted field, or even clear text), email address, IP address, etc. The privacy and security of users will be greatly threatened.
  • Ensure the security of your personal information.
  • Protect your emails, files, and other content.
  • Prevent others from stealing your account.

Tips to Create Strong Password

  • Do not reuse the same password
    Please use a different password for each important account (Ex: Email and online banking account).
  • Use a longer and easier to remember password
    The longer the password, the higher the security factor, so the password length should be at least 12 characters.
  • Don't use personal information and common words
    Avoid using information that others may know or can easily find to set passwords. For example, your nickname or initials.