diff --git a/postgresql-connection-string.cabal b/postgresql-connection-string.cabal
--- a/postgresql-connection-string.cabal
+++ b/postgresql-connection-string.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.0
 name: postgresql-connection-string
-version: 0.1.0.5
+version: 0.1.0.6
 category: Database, PostgreSQL
 synopsis: PostgreSQL connection string type, parser and builder
 description:
diff --git a/src/library-tests/Main.hs b/src/library-tests/Main.hs
--- a/src/library-tests/Main.hs
+++ b/src/library-tests/Main.hs
@@ -337,6 +337,25 @@
               ConnectionString.toHosts cs `shouldBe` [("localhost", Nothing)]
               ConnectionString.toUrl cs `shouldBe` "postgresql://user:secret@localhost"
 
+        it "postgresql://user:@localhost (empty password)" do
+          let input = "postgresql://user:@localhost"
+          case ConnectionString.parse input of
+            Left err -> expectationFailure ("Parse error: " <> Text.unpack err)
+            Right cs -> do
+              ConnectionString.toUser cs `shouldBe` Just "user"
+              ConnectionString.toPassword cs `shouldBe` Just ""
+              ConnectionString.toHosts cs `shouldBe` [("localhost", Nothing)]
+
+        it "postgresql://user:@localhost:5432/mydb (empty password with port and db)" do
+          let input = "postgresql://user:@localhost:5432/mydb"
+          case ConnectionString.parse input of
+            Left err -> expectationFailure ("Parse error: " <> Text.unpack err)
+            Right cs -> do
+              ConnectionString.toUser cs `shouldBe` Just "user"
+              ConnectionString.toPassword cs `shouldBe` Just ""
+              ConnectionString.toHosts cs `shouldBe` [("localhost", Just 5432)]
+              ConnectionString.toDbname cs `shouldBe` Just "mydb"
+
         it "postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp" do
           let input = "postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp"
           case ConnectionString.parse input of
diff --git a/src/library/PostgresqlConnectionString/Parsers.hs b/src/library/PostgresqlConnectionString/Parsers.hs
--- a/src/library/PostgresqlConnectionString/Parsers.hs
+++ b/src/library/PostgresqlConnectionString/Parsers.hs
@@ -37,6 +37,11 @@
               -- We still don't know if this is user:password@ or host:port
               asum
                 [ do
+                    -- Empty password: user:@host
+                    try (char '@')
+                    let user = unqualifiedWord
+                    continueFromHostspec (Just user) (Just "") [],
+                  do
                     password <- try do
                       label "Password" getWord <* char '@'
                     -- Definitely user:password@ pattern
