diff --git a/include/stdplus/raw.hpp b/include/stdplus/raw.hpp
index 4f6c076..77bcf5d 100644
--- a/include/stdplus/raw.hpp
+++ b/include/stdplus/raw.hpp
@@ -1,9 +1,8 @@
 #pragma once
-#include <fmt/format.h>
-
 #include <stdplus/concepts.hpp>
 
 #include <algorithm>
+#include <format>
 #include <span>
 #include <stdexcept>
 #include <string_view>
@@ -84,7 +83,7 @@
         if (bytes comp sizeof(ret))                                            \
         {                                                                      \
             throw std::runtime_error(                                          \
-                fmt::format(#func ": {} < {}", bytes, sizeof(ret)));           \
+                std::format(#func ": {} < {}", bytes, sizeof(ret)));           \
         }                                                                      \
         const auto c_bytes = reinterpret_cast<const std::byte*>(std::data(c)); \
         const auto ret_bytes = reinterpret_cast<std::byte*>(&ret);             \
@@ -119,7 +118,7 @@
         if (bytes comp sizeof(Tp))                                             \
         {                                                                      \
             throw std::runtime_error(                                          \
-                fmt::format(#func ": {} < {}", bytes, sizeof(Tp)));            \
+                std::format(#func ": {} < {}", bytes, sizeof(Tp)));            \
         }                                                                      \
         return *reinterpret_cast<Tp*>(std::data(c));                           \
     }
diff --git a/src/dl.cpp b/src/dl.cpp
index 050f25c..98ecae0 100644
--- a/src/dl.cpp
+++ b/src/dl.cpp
@@ -1,8 +1,9 @@
 #include <dlfcn.h>
-#include <fmt/format.h>
 
 #include <stdplus/dl.hpp>
 
+#include <format>
+
 namespace stdplus
 {
 
@@ -30,7 +31,7 @@
     void* ret = ::dlopen(file, flags);
     if (ret == nullptr)
     {
-        throw std::runtime_error(fmt::format(
+        throw std::runtime_error(std::format(
             "dlopen `{}`: {}", file ? file : "<nullptr>", dlerror()));
     }
     return ret;
diff --git a/src/fd/atomic.cpp b/src/fd/atomic.cpp
index ce9dff2..5299789 100644
--- a/src/fd/atomic.cpp
+++ b/src/fd/atomic.cpp
@@ -1,5 +1,5 @@
-#include <fmt/format.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 #include <stdplus/fd/atomic.hpp>
 #include <stdplus/fd/managed.hpp>
@@ -7,6 +7,7 @@
 
 #include <cstdlib>
 #include <filesystem>
+#include <format>
 #include <system_error>
 #include <utility>
 
@@ -19,7 +20,7 @@
 {
     auto name = filename.filename();
     auto path = filename.parent_path() /
-                fmt::format(".{}.XXXXXX", name.native());
+                std::format(".{}.XXXXXX", name.native());
     return path.native();
 }
 
@@ -30,7 +31,7 @@
     umask(old);
     return CHECK_ERRNO(fd, [&](int error) {
         throw std::system_error(error, std::generic_category(),
-                                fmt::format("mkstemp({})", tmpl));
+                                std::format("mkstemp({})", tmpl));
     });
 }
 
diff --git a/src/fd/create.cpp b/src/fd/create.cpp
index bfef66f..d9b90f0 100644
--- a/src/fd/create.cpp
+++ b/src/fd/create.cpp
@@ -1,10 +1,11 @@
 #include <fcntl.h>
-#include <fmt/format.h>
 #include <sys/socket.h>
 
 #include <stdplus/fd/create.hpp>
 #include <stdplus/util/cexec.hpp>
 
+#include <format>
+
 namespace stdplus
 {
 namespace fd
@@ -14,7 +15,7 @@
 {
     return DupableFd(
         CHECK_ERRNO(::open(pathname, static_cast<int>(flags), mode),
-                    fmt::format("open `{}`", pathname)));
+                    std::format("open `{}`", pathname)));
 }
 
 DupableFd socket(SocketDomain domain, SocketType type, SocketProto protocol)
diff --git a/src/fd/impl.cpp b/src/fd/impl.cpp
index 1272fc8..40ce7b3 100644
--- a/src/fd/impl.cpp
+++ b/src/fd/impl.cpp
@@ -1,5 +1,4 @@
 #include <fcntl.h>
-#include <fmt/format.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <unistd.h>
@@ -8,6 +7,7 @@
 #include <stdplus/fd/impl.hpp>
 #include <stdplus/util/cexec.hpp>
 
+#include <format>
 #include <string_view>
 
 namespace stdplus
@@ -102,12 +102,12 @@
 size_t FdImpl::lseek(off_t offset, Whence whence)
 {
     return CHECK_ERRNO(::lseek(get(), offset, static_cast<int>(whence)),
-                       fmt::format("lseek {}B {}", offset, whenceStr(whence)));
+                       std::format("lseek {}B {}", offset, whenceStr(whence)));
 }
 
 void FdImpl::truncate(off_t size)
 {
-    CHECK_ERRNO(::ftruncate(get(), size), fmt::format("ftruncate {}B", size));
+    CHECK_ERRNO(::ftruncate(get(), size), std::format("ftruncate {}B", size));
 }
 
 void FdImpl::bind(std::span<const std::byte> sockaddr)
@@ -156,7 +156,7 @@
 int FdImpl::constIoctl(unsigned long id, void* data) const
 {
     return CHECK_ERRNO(::ioctl(get(), id, data),
-                       fmt::format("ioctl {:#x}", id));
+                       std::format("ioctl {:#x}", id));
 }
 
 void FdImpl::fcntlSetfd(FdFlags flags)
diff --git a/src/fd/ops.cpp b/src/fd/ops.cpp
index e8f3636..b0f2bef 100644
--- a/src/fd/ops.cpp
+++ b/src/fd/ops.cpp
@@ -1,8 +1,7 @@
-#include <fmt/format.h>
-
 #include <stdplus/exception.hpp>
 #include <stdplus/fd/ops.hpp>
 
+#include <format>
 #include <utility>
 
 namespace stdplus
@@ -22,7 +21,7 @@
         if (ret.size() == 0)
         {
             throw exception::WouldBlock(
-                fmt::format("{} missing {}B", name, data.size()));
+                std::format("{} missing {}B", name, data.size()));
         }
         data = data.subspan(ret.size());
     }
@@ -61,7 +60,7 @@
         if (ret.size() != 0 && r.size() == 0)
         {
             throw exception::WouldBlock(
-                fmt::format("{} is {}B/{}B", name, ret.size() % align, align));
+                std::format("{} is {}B/{}B", name, ret.size() % align, align));
         }
         ret = data.subspan(0, ret.size() + r.size());
     } while (ret.size() % align != 0);
diff --git a/src/gtest/tmp.cpp b/src/gtest/tmp.cpp
index 4d06de5..d5e2ab2 100644
--- a/src/gtest/tmp.cpp
+++ b/src/gtest/tmp.cpp
@@ -1,8 +1,7 @@
-#include <fmt/format.h>
-
 #include <stdplus/gtest/tmp.hpp>
 
 #include <filesystem>
+#include <format>
 
 namespace stdplus
 {
@@ -10,7 +9,7 @@
 {
 
 TestWithTmp::TestWithTmp() :
-    casedir(fmt::format(
+    casedir(std::format(
         "{}/{}", SuiteTmpDir(),
         ::testing::UnitTest::GetInstance()->current_test_info()->name()))
 {
@@ -39,7 +38,7 @@
     {
         dir = "/tmp";
     }
-    return fmt::format(
+    return std::format(
         "{}/{}-{}", dir,
         ::testing::UnitTest::GetInstance()->current_test_suite()->name(),
         getpid());
diff --git a/src/net/addr/subnet.cpp b/src/net/addr/subnet.cpp
index 90fb702..1feb000 100644
--- a/src/net/addr/subnet.cpp
+++ b/src/net/addr/subnet.cpp
@@ -1,7 +1,6 @@
-#include <fmt/format.h>
-
 #include <stdplus/net/addr/subnet.hpp>
 
+#include <format>
 #include <stdexcept>
 
 namespace stdplus
@@ -12,7 +11,7 @@
 
 void invalidSubnetPfx(std::size_t pfx)
 {
-    throw std::invalid_argument(fmt::format("Invalid subnet prefix {}", pfx));
+    throw std::invalid_argument(std::format("Invalid subnet prefix {}", pfx));
 }
 
 template class Subnet46<In4Addr, uint8_t>;
diff --git a/test/fd/atomic.cpp b/test/fd/atomic.cpp
index b49112c..c503a99 100644
--- a/test/fd/atomic.cpp
+++ b/test/fd/atomic.cpp
@@ -3,6 +3,7 @@
 #include <stdplus/gtest/tmp.hpp>
 
 #include <filesystem>
+#include <format>
 #include <memory>
 #include <string_view>
 
@@ -19,7 +20,7 @@
     std::string filename;
     std::unique_ptr<AtomicWriter> file;
 
-    AtomicWriterTest() : filename(fmt::format("{}/out", CaseTmpDir())) {}
+    AtomicWriterTest() : filename(std::format("{}/out", CaseTmpDir())) {}
 
     ~AtomicWriterTest() noexcept
     {
@@ -45,7 +46,7 @@
 
 TEST_F(AtomicWriterTest, BadCommit)
 {
-    auto tmp = fmt::format("{}/tmp.XXXXXX", CaseTmpDir());
+    auto tmp = std::format("{}/tmp.XXXXXX", CaseTmpDir());
     ASSERT_NO_THROW(
         file = std::make_unique<AtomicWriter>("/dev/null", 0644, tmp));
     writeExact(*file, "hi\n"sv);
