Canonical: https://toolipedia.app/linux-password-hash-generator

# 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.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > Linux Password Hash Generator

## 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?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- linux password hash generator
- mkpasswd online
- shadow password hash
- sha512 crypt generator
- etc shadow hash generator

## 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.

## Related tools

More free tools that go well with Linux Password Hash Generator:
- [Hash generator](https://toolipedia.app/hash-generator)
- [Bcrypt hash generator](https://toolipedia.app/bcrypt-generator)
- [Errno, Exit Codes and Signals Reference](https://toolipedia.app/errno-exit-codes-and-signals-reference)
- [Argon2 password hash generator](https://toolipedia.app/argon2-hash-generator)
- [Password Key Derivation Generator and Verifier](https://toolipedia.app/password-key-derivation-generator-and-verifier)
