diff --git a/Database/Persist/Instances/IP.hs b/Database/Persist/Instances/IP.hs
--- a/Database/Persist/Instances/IP.hs
+++ b/Database/Persist/Instances/IP.hs
@@ -38,8 +38,8 @@
 -- The following instances don't really make sense, but persistent
 -- requires them so I defined them anyway.
 instance PathPiece IPRange where
-    fromPathPiece = readMaybe . T.unpack
-    toPathPiece = T.pack . show
+    fromPathPiece = readMaybe . T.unpack . T.replace "%2F" "/"
+    toPathPiece = T.replace "/" "%2F" . T.pack . show
 
 instance PathPiece IP where
     fromPathPiece = readMaybe . T.unpack
@@ -49,7 +49,7 @@
     toUrlPiece = T.pack . show
 
 instance ToHttpApiData IPRange where
-    toUrlPiece = T.pack . show
+    toUrlPiece = T.replace "/" "%2F" . T.pack . show
 
 instance FromHttpApiData IP where
     parseUrlPiece txt
@@ -58,5 +58,5 @@
 
 instance FromHttpApiData IPRange where
     parseUrlPiece txt
-        | Just ip <- readMaybe $ T.unpack txt = Right ip
+        | Just ipr <- readMaybe . T.unpack $ T.replace "%2F" "/" txt = Right ipr
         | otherwise = Left "Unable to parse IPRange"
diff --git a/persistent-iproute.cabal b/persistent-iproute.cabal
--- a/persistent-iproute.cabal
+++ b/persistent-iproute.cabal
@@ -1,5 +1,5 @@
 name:                persistent-iproute
-version:             0.2.1
+version:             0.2.2
 synopsis:            Persistent instances for types in iproute
 description:         Persistent instances and operators for types in iproute to use with PostgreSQL.
 license:             BSD3
