WireGuard MTU calculator
Your tunnel connects and pings, but pages hang? Enter the largest do-not-fragment ping that gets through, or pick your link type, and get the MTU to put in wg0.conf, the commands to apply it and the ping ladder to verify it. Everything runs in your browser.
Runs entirely in your browser. Nothing you type leaves the page.
Example: ping -M do -s 1472 SERVER_PUBLIC_IP replies, so you type 1472. If it fails, try the ladder in the test commands below and enter the largest size that passes.
Result
Your path carries full 1500-byte packets: the default 1420 fits. If large transfers still stall, the cause is elsewhere (forwarding, masquerade, AllowedIPs). You can still set MTU = 1420 explicitly.
[Interface]
PrivateKey = <client private key>
Address = 10.66.66.2/32
MTU = 1420
[Peer]
PublicKey = <server public key>
Endpoint = SERVER_PUBLIC_IP:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
# 1. Add the MTU line to [Interface] in /etc/wireguard/wg0.conf, then restart the tunnel
sudo wg-quick down wg0 && sudo wg-quick up wg0
# 2. Or change it live without restarting (lost at the next wg-quick down)
sudo ip link set dev wg0 mtu 1420
ip link show wg0 | grep -o 'mtu [0-9]*'
# Ping ladder to the server's PUBLIC IP, outside the tunnel: run from the top, the first size that replies is your payload
# A failing size prints 'message too long', 'needs to be fragmented' or no reply
ping -M do -s 1472 -c 3 SERVER_PUBLIC_IP
ping -M do -s 1464 -c 3 SERVER_PUBLIC_IP
ping -M do -s 1452 -c 3 SERVER_PUBLIC_IP
ping -M do -s 1444 -c 3 SERVER_PUBLIC_IP
ping -M do -s 1400 -c 3 SERVER_PUBLIC_IP
ping -M do -s 1372 -c 3 SERVER_PUBLIC_IP
ping -M do -s 1300 -c 3 SERVER_PUBLIC_IP
ping -M do -s 1252 -c 3 SERVER_PUBLIC_IP
# Verification through the tunnel, to the server's tunnel IP: this must reply with the new MTU
ping -M do -s 1392 -c 3 10.66.66.1
# payload = MTU minus 28; if this fails, lower the MTU further
Half of MTU trouble is the path, not the config
Double NAT, a home router and a tunnel stacked on a tunnel all shave bytes off your path. A VPS with a clean public IPv4 is one hop on a 1500-byte link, where the default 1420 just works. Contabo's entry VPS includes a public IPv4 address and full root.
Affiliate link: we may earn a commission, at no extra cost to you. The calculator stays free and does not depend on it.
Where the numbers come from
WireGuard wraps each of your packets in a UDP datagram. The wrapper has a fixed size, so the tunnel MTU is simply the path MTU minus that wrapper. This is exactly what wg-quick does when no MTU is set: it takes the MTU of the route to the endpoint and subtracts 80, which gives the familiar 1420 on a 1500-byte link.
| Header | Bytes |
|---|---|
| Outer IPv4 header | 20 |
| Outer IPv6 header | 40 |
| UDP header | 8 |
| WireGuard data header (type, index, counter) | 16 |
| Poly1305 authentication tag | 16 |
| Total over IPv4 / over IPv6 | 60 / 80 |
| Ping: IPv4 + ICMP headers around the payload | 28 |
A ping payload of 1472 bytes therefore travels in a 1500-byte packet. If 1472 passes with the do-not-fragment flag, your path MTU is 1500 and the default 1420 fits. If only 1400 passes, the path MTU is 1428 and WireGuard must not send more than 1348 over IPv6. The calculator subtracts 80 unless you tell it the outer connection is IPv4-only, in which case 60 is enough.
Typical values when you cannot measure
A measured value always beats a table. These baselines are for the cases where you cannot run the ping, for example on a phone or on a network you do not control.
| Link type | Path MTU | WireGuard MTU |
|---|---|---|
| Ethernet, fibre, cable | 1500 | 1420 (default) |
| PPPoE DSL | 1492 | 1412 |
| Mobile, 5G, CGNAT | varies | 1280 (fallback) |
| Tunnel inside another VPN | reduced twice | 1280 (fallback) |
| IPv6 guaranteed minimum | 1280 | 1280 |