Letting crushed eggshells sit in a bitter cup of coffee for a few minutes before straining the drink can counter its bitterness like magic, and there’s a scientific reason why.
Coffee is harsh and bitter due to a range of acids called chlorogenic acid lactones. A primary chemical is needed to "soak up" that acidity and lower the coffee's pH.
Eggshells are primarily made of calcium carbonate, which is alkaline and can absorb all bitter, acidic compounds to transform the brew back to its smooth, mellow taste.
However, per America's Test Kitchen, this hack can sacrifice the complexity of the coffee's flavor, so it's better suited for cheap coffee grounds than specialty ones.
The shells of boiled eggs are preferred as most of their impurities are eliminated in the water. Shells from raw eggs sanitized with a soak in vinegar and water will work, too.