← All text tools

Linux Password Hash Generator

Make a SHA-512, SHA-256 or MD5 crypt password hash like mkpasswd for /etc/shadow, Ansible, kickstart or cloud-init files, with optional salt and rounds.

  • Free
  • No sign-up
  • Works on any device

About Linux Password Hash Generator

Makes the salted, iterated password hash that Linux keeps in /etc/shadow, the same strings that mkpasswd and openssl passwd -6 print. Choose SHA-512 ($6$), SHA-256 ($5$) or MD5 ($1$), enter a password and an optional salt and round count, and copy the result for chpasswd -e, Ansible's user module, kickstart or cloud-init. For the SHA-512 test case, password Hello world! with salt saltstring, the result begins $6$saltstring$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl. It follows Ulrich Drepper's SHA-crypt specification and matches OpenSSL.

How to use Linux Password Hash Generator

  1. Type the password and choose SHA-512, SHA-256 or MD5.
  2. Leave the salt empty for a random one, or type your own, and set the rounds if you need more than the default.
  3. Copy the hash, or the ready example line for /etc/shadow, chpasswd, Ansible or kickstart.

Why use this tool?

Also known as

Frequently asked questions

Why is the hash different every time?

A random salt is chosen when you leave the salt box empty, so the same password gives a different hash each time. Type a fixed salt if you need a repeatable result.

Which type should I use?

SHA-512 works on every Linux that uses crypt. MD5 is old and weak. Newer systems may default to yescrypt, which this page cannot make, but they still accept $6$ hashes.

What do the rounds do?

The default is 5,000 rounds. A higher number makes every guess more expensive for an attacker, and every login a little slower. An explicit rounds value is written into the hash, and the minimum is 1,000.

Is Linux Password Hash Generator free?

Yes. Linux Password Hash Generator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.