PostgreSQL User & Database Generator

Generate SQL commands to create PostgreSQL users, databases, and configure permissions.

PostgreSQL username (max 63 characters)
Database name (max 63 characters)
1eFBIFT7swz0%u!b
A secure password has been automatically generated. Click "New Password" to generate a different one.
Choose the level of permissions for the user
Database Custom Permissions
Global Custom Permissions
How to Use
  1. Enter the desired username and database name
  2. A secure password will be automatically generated
  3. Choose the appropriate permission level
  4. Click "Generate SQL Commands" to create the commands
  5. Copy and execute the generated SQL in your PostgreSQL client
Permission Levels:
  • Database Read/Write: Full access to the specific database (recommended)
  • Database Read Only: SELECT permissions on the specific database
  • Database Custom: Choose specific permissions for the database
  • Global Full Access: Grants superuser privileges (use with caution)
  • Global Custom: Choose specific global server permissions
⚠️ Security Note:

Always follow the principle of least privilege when assigning database permissions. Database-specific permissions are recommended over global permissions. The generated commands are for convenience - review them before execution in production environments.