diff --git a/include/http_utility.hpp b/include/http_utility.hpp
index ae436ca..74ab15a 100644
--- a/include/http_utility.hpp
+++ b/include/http_utility.hpp
@@ -1,10 +1,6 @@
 #pragma once
 
-#include <boost/algorithm/string/classification.hpp>
-#include <boost/algorithm/string/constants.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-#include <boost/type_index/type_index_facade.hpp>
-
+#include <algorithm>
 #include <cctype>
 #include <iomanip>
 #include <ostream>
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp
index 7a161fc..3bb82b9 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -3,7 +3,6 @@
 #include "ibm/utils.hpp"
 #include "logging.hpp"
 
-#include <boost/algorithm/string/predicate.hpp>
 #include <boost/container/flat_map.hpp>
 #include <boost/endian/conversion.hpp>
 #include <nlohmann/json.hpp>
@@ -363,8 +362,8 @@
 {
     // validate the locktype
 
-    if (!((boost::equals(std::get<2>(refLockRecord), "Read") ||
-           (boost::equals(std::get<2>(refLockRecord), "Write")))))
+    if (!((std::get<2>(refLockRecord) == "Read" ||
+           (std::get<2>(refLockRecord) == "Write"))))
     {
         BMCWEB_LOG_DEBUG("Validation of LockType Failed");
         BMCWEB_LOG_DEBUG("Locktype : {}", std::get<2>(refLockRecord));
@@ -392,9 +391,8 @@
         // validate the lock flags
         // Allowed lockflags are locksame,lockall & dontlock
 
-        if (!((boost::equals(p.first, "LockSame") ||
-               (boost::equals(p.first, "LockAll")) ||
-               (boost::equals(p.first, "DontLock")))))
+        if (!((p.first == "LockSame" || (p.first == "LockAll") ||
+               (p.first == "DontLock"))))
         {
             BMCWEB_LOG_DEBUG("Validation of lock flags failed");
             BMCWEB_LOG_DEBUG("{}", p.first);
@@ -411,8 +409,7 @@
             return false;
         }
 
-        if ((boost::equals(p.first, "LockSame") ||
-             (boost::equals(p.first, "LockAll"))))
+        if ((p.first == "LockSame" || (p.first == "LockAll")))
         {
             ++lockFlag;
             if (lockFlag >= 2)
@@ -534,8 +531,8 @@
 {
     // No conflict if both are read locks
 
-    if (boost::equals(std::get<2>(refLockRecord1), "Read") &&
-        boost::equals(std::get<2>(refLockRecord2), "Read"))
+    if (std::get<2>(refLockRecord1) == "Read" &&
+        std::get<2>(refLockRecord2) == "Read")
     {
         BMCWEB_LOG_DEBUG("Both are read locks, no conflict");
         return false;
@@ -546,8 +543,8 @@
     {
         // return conflict when any of them is try to lock all resources
         // under the current resource level.
-        if (boost::equals(p.first, "LockAll") ||
-            boost::equals(std::get<4>(refLockRecord2)[i].first, "LockAll"))
+        if (p.first == "LockAll" ||
+            std::get<4>(refLockRecord2)[i].first == "LockAll")
         {
             BMCWEB_LOG_DEBUG(
                 "Either of the Comparing locks are trying to lock all "
@@ -558,8 +555,8 @@
         // determine if there is a lock-all-with-same-segment-size.
         // If the current segment sizes are the same,then we should fail.
 
-        if ((boost::equals(p.first, "LockSame") ||
-             boost::equals(std::get<4>(refLockRecord2)[i].first, "LockSame")) &&
+        if ((p.first == "LockSame" ||
+             std::get<4>(refLockRecord2)[i].first == "LockSame") &&
             (p.second == std::get<4>(refLockRecord2)[i].second))
         {
             return true;
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index fd1e2a5..103017b 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -6,9 +6,9 @@
 #include "event_service_manager.hpp"
 #include "ibm/locks.hpp"
 #include "resource_messages.hpp"
+#include "str_utility.hpp"
 #include "utils/json_utils.hpp"
 
-#include <boost/algorithm/string/predicate.hpp>
 #include <boost/container/flat_set.hpp>
 #include <nlohmann/json.hpp>
 #include <sdbusplus/message/types.hpp>
@@ -49,7 +49,7 @@
     std::error_code ec;
     // Check the content-type of the request
     boost::beast::string_view contentType = req.getHeaderValue("content-type");
-    if (!boost::iequals(contentType, "application/octet-stream"))
+    if (!bmcweb::asciiIEquals(contentType, "application/octet-stream"))
     {
         asyncResp->res.result(boost::beast::http::status::not_acceptable);
         asyncResp->res.jsonValue["Description"] = contentNotAcceptableMsg;
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 6bd3920..e801a32 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -28,8 +28,6 @@
 #include <systemd/sd-bus.h>
 #include <tinyxml2.h>
 
-#include <boost/algorithm/string/classification.hpp>
-#include <boost/algorithm/string/predicate.hpp>
 #include <boost/beast/http/status.hpp>
 #include <boost/beast/http/verb.hpp>
 #include <boost/container/flat_map.hpp>
@@ -429,7 +427,10 @@
 
         // Map indicating connection name, and the path where the object
         // manager exists
-        boost::container::flat_map<std::string, std::string> connections;
+        boost::container::flat_map<
+            std::string, std::string, std::less<>,
+            std::vector<std::pair<std::string, std::string>>>
+            connections;
 
         for (const auto& object : *(transaction->subtree))
         {
@@ -711,7 +712,14 @@
             }
             else if (stringValue != nullptr)
             {
-                boolInt = boost::istarts_with(*stringValue, "t") ? 1 : 0;
+                if (!stringValue->empty())
+                {
+                    if (stringValue->front() == 't' ||
+                        stringValue->front() == 'T')
+                    {
+                        boolInt = 1;
+                    }
+                }
             }
             else
             {
diff --git a/include/str_utility.hpp b/include/str_utility.hpp
index 7142583..8ac54b9 100644
--- a/include/str_utility.hpp
+++ b/include/str_utility.hpp
@@ -1,5 +1,7 @@
 #pragma once
 
+#include <algorithm>
+#include <ranges>
 #include <string>
 #include <string_view>
 #include <vector>
@@ -21,4 +23,22 @@
         start = end + 1;
     }
 }
+
+inline char asciiToLower(char c)
+{
+    // Converts a character to lower case without relying on std::locale
+    if ('A' <= c && c <= 'Z')
+    {
+        c -= ('A' - 'a');
+    }
+    return c;
+}
+
+inline bool asciiIEquals(std::string_view left, std::string_view right)
+{
+    return std::ranges::equal(left, right, [](char lChar, char rChar) {
+        return asciiToLower(lChar) == asciiToLower(rChar);
+    });
+}
+
 } // namespace bmcweb
diff --git a/include/webassets.hpp b/include/webassets.hpp
index 5ab0323..c5c7228 100644
--- a/include/webassets.hpp
+++ b/include/webassets.hpp
@@ -6,7 +6,6 @@
 #include "routing.hpp"
 #include "webroutes.hpp"
 
-#include <boost/algorithm/string/replace.hpp>
 #include <boost/container/flat_set.hpp>
 
 #include <filesystem>
