WireGuard MTU calculator

The tunnel comes up, ping works, but web pages hang: that is almost always an MTU too large for the path. Give this page either the result of a do-not-fragment ping or your link type, and it returns the MTU line for your WireGuard interface. It is plain arithmetic run in your browser, nothing is sent anywhere.

The path to your server
StepBytes



How to run the ping

Send the ping to the server's public address (the Endpoint), not to its tunnel address, with the tunnel down or routed outside it. Start at 1472 and go down until a reply comes back:

Linux    ping -M do -s 1472 SERVER_IP
macOS    ping -D -s 1472 SERVER_IP
Windows  ping -f -l 1472 SERVER_IP
IPv6     ping -6 -M do -s 1452 SERVER_IPV6

"Message too long", "Frag needed" or "Packet needs to be fragmented" means the payload is too large. A plain timeout can also mean that ICMP is filtered, so cross-check with a second payload 100 bytes smaller.

The arithmetic

An IPv4 ping adds 28 bytes of headers to its payload (20 IP + 8 ICMP), an IPv6 ping adds 48 (40 + 8). That gives the path MTU. WireGuard then wraps each packet in an outer IP header (20 bytes over IPv4, 40 over IPv6), 8 bytes of UDP and 32 bytes of its own framing (16-byte header plus 16-byte authentication tag): 60 bytes over IPv4, 80 over IPv6. The default 1420 is 1500 minus 80, which is why it fits any 1500-byte path whatever the endpoint family. If the client may roam between IPv4 and IPv6, keep the IPv6 figure.

The interface MTU should not go below 1280 if you route IPv6 through the tunnel: 1280 is the minimum every IPv6 link must carry.