diff --git a/ini.cabal b/ini.cabal
--- a/ini.cabal
+++ b/ini.cabal
@@ -1,5 +1,5 @@
 name:                ini
-version:             0.2.2
+version:             0.3.0
 synopsis:            Quick and easy configuration files in the INI format.
 description:         Quick and easy configuration files in the INI format.
 license:             BSD3
diff --git a/src/Data/Ini.hs b/src/Data/Ini.hs
--- a/src/Data/Ini.hs
+++ b/src/Data/Ini.hs
@@ -131,7 +131,7 @@
      _ <- char ']'
      skipEndOfLine
      values <- many1 keyValueParser
-     return (name,M.fromList values)
+     return (T.strip name, M.fromList values)
 
 -- | A key-value pair. Either @foo: bar@ or @foo=bar@.
 keyValueParser :: Parser (Text,Text)
@@ -141,7 +141,7 @@
      delim <- satisfy isDelim
      value <- fmap (clean delim) (takeWhile (not . isEndOfLine))
      skipEndOfLine
-     return (key,value)
+     return (T.strip key, T.strip value)
   where clean ':' = T.drop 1
         clean _   = id
 
