BudiBadu Logo
Toolbadu

password_hash Online

Test PHP's password_hash() function online using real PHP 8.2. Create secure password hashes with bcrypt, argon2i, or argon2id algorithms. See exactly how PHP hashes passwords in your application.

password_hash(string $password, string|int|null $algo, array $options = []): string

Hashing Algorithm & Options

Higher = more secure but slower

Password Input

Enter the password you want to hash

PHP Code

This is the actual PHP code that will be executed

Loading editor...

Hashed Password

Hashed password will appear here...

Quick Examples

password_hash() Function Guide

About password_hash()

This tool runs actual PHP 8.2 code on our server using Docker containers. It executes real PHP's password_hash() function, ensuring 100% accurate results that match your production environment. The function creates a secure one-way hash of passwords using industry-standard algorithms.

  • Creates secure password hashes
  • Supports bcrypt and argon2 algorithms
  • Includes random salt automatically
  • One-way encryption (cannot be reversed)
  • Use with password_verify() to check passwords

Algorithm Recommendations

PASSWORD_DEFAULT: Uses bcrypt currently. Recommended for most use cases as it automatically updates to stronger algorithms in future PHP versions.

PASSWORD_BCRYPT: Time-tested and widely used. Cost parameter (10-12 recommended) balances security and performance. Higher cost = exponentially slower.

PASSWORD_ARGON2ID: Most secure option, resistant to GPU and side-channel attacks. Recommended for high-security applications. Requires PHP 7.3+.

Request a Feature

Have an idea to improve this tool? Share your suggestions and help us make it better! (One request per day)

0/1000 characters