diff --git a/src/util/indented-stream.cpp b/src/util/indented-stream.cpp
new file mode 100644
index 0000000..04c04cd
--- /dev/null
+++ b/src/util/indented-stream.cpp
@@ -0,0 +1,68 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "indented-stream.hpp"
+
+#include <vector>
+
+#include <boost/range/iterator_range.hpp>
+#include <boost/algorithm/string/split.hpp>
+
+namespace ndn {
+namespace util {
+
+IndentedStream::IndentedStream(std::ostream& os, const std::string& indent)
+  : std::ostream(&m_buffer)
+  , m_buffer(os, indent)
+{
+}
+
+IndentedStream::~IndentedStream()
+{
+  flush();
+}
+
+IndentedStream::StreamBuf::StreamBuf(std::ostream& os, const std::string& indent)
+  : m_output(os)
+  , m_indent(indent)
+{
+}
+
+int
+IndentedStream::StreamBuf::sync()
+{
+  typedef boost::iterator_range<std::string::const_iterator> StringView;
+
+  const std::string& output = str();
+  std::vector<StringView> splitOutput;
+  boost::split(splitOutput, output, [] (char ch) { return ch == '\n'; });
+
+  if (!splitOutput.empty() && splitOutput.back().empty()) {
+    splitOutput.pop_back();
+  }
+  for (const StringView& line : splitOutput) {
+    m_output << m_indent << line << "\n";
+  }
+  return 0; // success
+}
+
+} // namespace util
+} // namespace ndn
diff --git a/src/util/indented-stream.hpp b/src/util/indented-stream.hpp
new file mode 100644
index 0000000..0ab76a2
--- /dev/null
+++ b/src/util/indented-stream.hpp
@@ -0,0 +1,82 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#ifndef NDN_UTIL_INDENTED_STREAM_HPP
+#define NDN_UTIL_INDENTED_STREAM_HPP
+
+#include <ostream>
+#include <sstream>
+#include <string>
+
+namespace ndn {
+namespace util {
+
+/**
+ * @brief Output to stream with specified indent or prefix
+ *
+ * For example, the following code:
+ *
+ *     std::cout << "Hello" << std::endl;
+ *     IndentedStream os1(std::cout, " [prefix] ");
+ *     os1 << "," << "\n";
+ *     {
+ *       IndentedStream os2(os1, " [another prefix] ");
+ *       os2 << "World!" << "\n";
+ *     }
+ *     // either os1 needs to go out of scope or call os1.flush()
+ *
+ * Will produce the following output:
+ *
+ *     Hello
+ *      [prefix] ,
+ *      [prefix] [another prefix] World!
+ *
+ * Based on http://stackoverflow.com/a/2212940/2150331
+ */
+class IndentedStream : public std::ostream
+{
+public:
+  IndentedStream(std::ostream& os, const std::string& indent);
+
+  ~IndentedStream();
+
+private:
+  // Write a stream buffer that prefixes each line
+  class StreamBuf : public std::stringbuf
+  {
+  public:
+    StreamBuf(std::ostream& os, const std::string& indent);
+
+    virtual int
+    sync();
+
+  private:
+    std::ostream& m_output;
+    std::string m_indent;
+  };
+
+  StreamBuf m_buffer;
+};
+
+} // namespace util
+} // namespace ndn
+
+#endif // NDN_UTIL_INDENTED_STREAM_HPP
