diff --git a/src/utility/nlsr_tokenizer.hpp b/src/utility/nlsr_tokenizer.hpp
new file mode 100644
index 0000000..6cd97e0
--- /dev/null
+++ b/src/utility/nlsr_tokenizer.hpp
@@ -0,0 +1,104 @@
+#ifndef NLSR_TOKENIZER_HPP
+#define NLSR_TOKENIZER_HPP
+
+#include <iostream>
+#include <boost/tokenizer.hpp>
+#include <boost/algorithm/string.hpp>
+#include <string>
+#include <list>
+#include <vector>
+#include <ndn-cpp-dev/face.hpp>
+
+namespace nlsr
+{
+
+    using namespace std;
+    using namespace boost;
+
+    class nlsrTokenizer
+    {
+    public:
+        nlsrTokenizer(const string& inputString)
+            : firstToken()
+            , restOfTheLine()
+            , currentPosition(0)
+        {
+            seps = " ";
+            originalString = inputString;
+            makeToken();
+        }
+
+        nlsrTokenizer(const string& inputString, const string& separator)
+            : firstToken()
+            , restOfTheLine()
+            , currentPosition(0)
+        {
+            seps = separator;
+            originalString = inputString;
+            makeToken();
+        }
+
+        string getFirstToken()
+        {
+            return firstToken;
+        }
+
+        string getRestOfLine()
+        {
+            return restOfTheLine;
+        }
+
+        void resetCurrentPosition(uint32_t cp=0)
+        {
+            if( cp >=0 && cp <= vTokenList.size() )
+            {
+                currentPosition=cp;
+            }
+        }
+
+        string getNextToken()
+        {
+            if(currentPosition >= 0 && currentPosition <= (vTokenList.size()-1))
+            {
+                return vTokenList[currentPosition++];
+            }
+            return "";
+        }
+
+        uint32_t getTokenNumber()
+        {
+            return tokenList.size();
+        }
+
+        string getToken(int position)
+        {
+            if( position >=0 && position <vTokenList.size() )
+            {
+                return vTokenList[position];
+            }
+            return "";
+        }
+
+        int getTokenPosition(string& token);
+        string getTokenString(int from , int to);
+        string getTokenString(int from);
+        bool doesTokenExist(string token);
+
+
+    private:
+
+        void makeToken();
+        void insertToken(const string& token);
+        void makeRestOfTheLine();
+
+        string seps;
+        string originalString;
+        string firstToken;
+        string restOfTheLine;
+        std::list<string> tokenList;
+        std::vector<string> vTokenList;
+        uint32_t currentPosition;
+    };
+
+}//namespace nlsr
+#endif
