diff --git a/Data/Text/Punycode.hs b/Data/Text/Punycode.hs
--- a/Data/Text/Punycode.hs
+++ b/Data/Text/Punycode.hs
@@ -1,4 +1,18 @@
-module Data.Text.Punycode (encode, decode) where
+module Data.Text.Punycode (encode, decode, internationalize) where
 
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.UTF8 as UTF8BS
+import Data.Char (isAscii)
+
 import Data.Text.Punycode.Encode (encode)
 import Data.Text.Punycode.Decode (decode)
+
+-- | Convenience function for internationalized domain names. If there is
+-- at least one non-ascii character, this function will encode the input
+-- and prepend \"xn--\" to the output string. Otherwise, it will return the
+-- string untouched. Note that this function does not run nameprep (e.g. it
+-- operates on pre-prepped strings)
+internationalize :: String -> BS.ByteString
+internationalize x
+  | all isAscii x = UTF8BS.fromString x
+  | otherwise = UTF8BS.fromString "xn--" `BS.append` encode x
diff --git a/punycode.cabal b/punycode.cabal
--- a/punycode.cabal
+++ b/punycode.cabal
@@ -1,5 +1,5 @@
 name:            punycode
-version:         0.5
+version:         0.5.1
 license:         BSD3
 license-file:    LICENSE
 author:          Myles C. Maxfield <myles.maxfield@gmail.com>
@@ -17,6 +17,7 @@
                  , bytestring
                  , cereal
                  , mtl
+                 , utf8-string
     exposed-modules: Data.Text.Punycode
     other-modules:   Data.Text.Punycode.Encode
                    , Data.Text.Punycode.Decode
@@ -32,6 +33,7 @@
                  , mtl
                  , HUnit
                  , QuickCheck
+                 , utf8-string
 
 source-repository head
   type:     git
