A treenail, also trenail, trennel, or trunnel, is a wooden peg, pin, or dowel used to fasten pieces of wood together, especially in timber frames, covered bridges, wooden shipbuilding and boat building. Many such buildings and bridges are still in use. Locust is a favorite wood when making trunnels in shipbuilding due to its strength and rot resistance and red oak is typical in buildings.
A method of firmly securing such a fastener in shipbuilding was to cut a parallel peg of a softer wood, and then expand its outer end with a wedge of much harder wood driven into it called a foxtail wedge.
Ancient shipbuilding used treenails to bind the boat together. They had the advantage of not giving rise to "nail-sickness", a term for decay accelerated and concentrated around metal fasteners. Increased water content causes wood to expand, so that treenails gripped the planks tighter as they absorbed water. Similar wooden trenail fastenings were used as alternatives to metal spikes to secure railroad rail-support "chairs" to wooden sleepers in early Victorian times.