My diet:
Comparison

Xylitol vs Erythritol

The short answer
Erythritol has almost no calories, doesn't raise blood sugar and is easier on the stomach, so it's the better keto pick. Xylitol tastes more like sugar and has the strongest evidence for teeth, but it's deadly to dogs.
Side by sideXylitolErythritol
Safety score68/100 Use in moderation70/100 Use in moderation
Sweetness vs sugarAbout the same ✓ BetterAbout 70%
Calories per gram2.4About 0.2 ✓ Better
Glycemic index70 ✓ Better
Stomach toleranceGas and diarrhea at larger dosesBetter; most is absorbed and passed in urine ✓ Better
TeethStrongest evidence against cavities ✓ BetterDoesn't feed cavity bacteria
PetsHighly toxic to dogsNot known to be toxic to dogs ✓ Better
Cooling aftertasteMild ✓ BetterNoticeable

Swapping one for the other

Xylitol replaces sugar 1:1. To swap erythritol in, use about 1⅓ times as much, or a blend with stevia or monk fruit. Neither caramelizes like sugar, and xylitol won't let yeast dough rise.

Common questions

Are both linked to heart risk?

Studies from the same research group linked high blood levels of each to blood clotting and heart events (erythritol in 2023, xylitol in 2024). Both findings need confirming.

Which is better for low-FODMAP?

Erythritol is usually better tolerated. Xylitol is a high-FODMAP polyol.