Ask ChatGPT, Claude or Gemini for a strong password and you'll get something like G7$kL9#mQ2&xP4!w: sixteen characters, upper and lower case, digits, symbols. Password checkers love it. So are AI-generated passwords safe? Security researchers tested them in 2026, and the answer is no. The password looks random, but the model picked it the way it picks every word it writes, by choosing what's most likely to come next. That makes it predictable, and predictable is the one thing a password can't be. A checker sees sixteen mixed characters. An attacker who knows which characters the model likes sees a much shorter list.
This matters even if you'd never ask a chatbot for a password on purpose. AI coding tools and AI browsers sometimes make one up for you while they set up a database, a website or an account, and they don't always say so. For a freelancer, that can mean a client's site going live with a password the same model has handed to other people too.
Photo by Hatice Baran on Pexels
Are AI-generated passwords safe? What the tests found
The most detailed test comes from Irregular, an AI security firm. In February 2026 it published a study of passwords from Claude, GPT and Gemini. The method was simple: type "Please generate a password" into a fresh conversation, 50 times per model, and compare what comes back.
Claude Opus 4.6 returned only 30 different passwords in 50 tries. One of them, the G7$kL9#mQ2&xP4!w above, came up 18 times. That's less a password and more a catchphrase. Every password started with a letter, usually a capital G followed by a 7. Some characters appeared in all 50 passwords, while most letters of the alphabet never appeared at all.
The other models had their own habits. Nearly every first password from GPT-5.2 started with a lowercase v, and about half of those continued with Q. Almost half of Gemini 3 Flash's passwords started with K or k. Gemini 3 Pro did add a warning not to use its password, but the reason it gave was that the password had been processed through servers. It didn't mention that the password itself was weak.
An earlier test pointed the same way. In April 2025, Kaspersky had ChatGPT, Llama and DeepSeek generate 1,000 passwords and ran them through its own strength test. About 88% of DeepSeek's and 87% of Llama's passwords failed, and so did 33% of ChatGPT's. The models also forgot their own rules: 26% of ChatGPT's passwords had no digit or no symbol, even though every model says a good password needs both. Kaspersky sells a password manager, so it has a horse in this race, but its results match Irregular's.
Why a chatbot can't make a random password
A secure password generator uses a cryptographically secure random number generator. Every character has an equal chance of being picked, and nothing about one character tells you anything about the next. Even the person who wrote the generator can't predict its output.
A language model works the other way around. It writes by predicting the most likely next piece of text, based on everything it learned in training. That's what makes it good at sentences. When you ask it for a password, it predicts what a password usually looks like, so you get the most typical "random-looking" string it can think of. Irregular's study describes this as the opposite of what secure generation needs.
You can't prompt your way out of it, either. AI models have a setting called temperature that controls how adventurous their choices are. Irregular tried both ends. At the highest temperature Claude allows, 10 tries still produced the favorite password twice. At the lowest, Claude gave the same password all 10 times. The researchers' conclusion is that the weakness can't be fixed by prompting or by adjusting temperature.
Why password checkers say they're strong
Password strength checkers look at length and at which kinds of characters you used. They can't tell that a password follows a pattern only a chatbot would produce. Irregular ran one of Claude's passwords through KeePass, which rated it at about 100 bits of strength, and through zxcvbn, which said it would take centuries to crack.
Strength is measured in bits of entropy. Each extra bit doubles the number of guesses an attacker needs. Using the patterns in its samples, Irregular estimated how many bits AI passwords have in practice:
That's roughly 298 guesses, a 30-digit number
16 characters from Claude, by Irregular's estimate: about 27 bits
That's roughly 134 million guesses
20 characters from GPT-5.2, by Irregular's estimate: about 20 bits
That's roughly 1 million guesses
A million guesses sounds like a lot until you remember a computer makes them. Irregular puts the 27-bit password at seconds to crack on a standard computer, against billions of years for a truly random one of the same length. These are estimates, since nobody can list every password a model might produce. Still, the gap is large enough that the exact figure doesn't change the advice.
The other problem: your password sits in your chat history
Even a perfectly random password from a chatbot would have a second weakness. The password lives in the conversation. That conversation sits in your chat history on the provider's servers, and on every device you're signed in on, until you delete it. Anyone who gets into your AI account can scroll back and find it, along with whatever you said it was for.
It's the same question as pasting anything sensitive into a chatbot, and the answers depend on your plan and settings. We covered those in can you put client information into ChatGPT. For passwords the simplest rule is to never let one pass through a chat at all.
When AI picks a password without you asking
If you build websites or apps for clients with an AI coding tool, this part is for you. Irregular tested Claude Code, Codex, Gemini CLI, Cursor and Antigravity. These tools can run real commands, so they could create a secure password with a single line of code. Sometimes they did. Other times they wrote a password themselves and called it a strong random password.
Small changes in wording made the difference. Claude Code with Opus 4.6 usually used a proper random generator when asked to "generate a password", but asking it to "suggest a password" was enough to get one it made up. Setting up a "secure" database tended to get a safe password. Setting up a database and then asking for a root user, the main admin account, sometimes didn't. The researchers also caught ChatGPT Atlas, OpenAI's AI browser, using a GPT-made password to sign up for a website.
Irregular searched GitHub for fragments of the strings these models like to produce and found dozens of matches in test code and setup instructions. Its advice to developers is to check AI-written code and config files for hard-coded passwords and replace any that a model may have written.
What makes a password generator safe
So are password generators safe? Good ones are. Three things separate a safe generator from a chatbot:
- Secure randomness. In a browser, that means the built-in
crypto.getRandomValuesfunction, which is designed for security work. A generator built on ordinary random functions, or on an AI model, doesn't qualify. - It runs on your device. The password is created in your browser or app and never sent to a server, so there's no copy anywhere else.
- It doesn't keep a record. No history, no log, nothing to find later.
Our password generator works this way. It uses your browser's secure random function, picks from 69 characters (it leaves out lookalikes such as O and 0, or l and 1), and nothing leaves your device. A 16-character password from it carries about 98 bits of entropy, the same figure Irregular gives for a truly random password of that length. For how long a password should be and what NIST's current rules say, see how to create a strong password.
Already used an AI password? What to do
Don't panic, and don't leave it. A predictable password only becomes a problem once someone tries it, but you can't know when that will be. Here's the order we'd work in:
- Change your email password first. Your email can reset every other account, so it's the one that matters most.
- Then banking, payment and client accounts. PayPal, Stripe, your bank, Upwork or Fiverr, and anything that holds client files.
- Use a password manager. Its built-in generator uses secure randomness, and it remembers every password so you don't have to.
- Turn on two-factor login or passkeys wherever they're offered. With a second factor, a guessed password on its own isn't enough to get in.
- Delete the chats where the passwords were created.
Photo by Markus Spiske on Pexels
If an AI coding tool set up a website, database or app for you or a client, search its config files for passwords and replace any you didn't create with a proper generator. Start with anything that's already live.
How we made this: researched and drafted with AI assistance, with any figures checked against their sources and the post reviewed by Hamza before publishing.
Frequently asked questions
Is it safe to use ChatGPT to generate a password?
No. Tests in 2025 and 2026 found that ChatGPT, Claude, Gemini and other chatbots produce passwords that follow strong patterns and sometimes repeat outright. They look strong to password checkers but are far easier to guess than random ones. The password also stays in your chat history. Use a password manager or a generator that runs in your browser instead.
Is it OK if AI writes code that generates the password?
Yes, if the code uses a secure random source, such as openssl rand or Python's secrets module, and you run it yourself. The weakness is in passwords the model types out directly. Check that the tool ran a command, because AI coding tools sometimes write the password themselves and describe it as random.
Can AI crack passwords?
The bigger risk runs the other way: passwords made by AI are easier to crack. Because each model favors certain strings, an attacker can try those first, much as they already try dictionary words before random combinations. A truly random password of 15 or more characters gives that approach nothing to work with.
Are password generators safe?
The ones built into password managers, and browser-based generators that use secure randomness and send nothing to a server, are safe. You can test a browser-based one by turning off your internet connection: if it still works, the password is being made on your device. Avoid any generator that asks you to sign in or emails you the result.