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. It is driven into a hole bored through two (or more) pieces of structural wood (mortise and tenon).
The use of wood as a tenon can be traced back over 7,000 years, as archaeologist have found traces of wood nails in the excavation of early Germanic sites. Trenails are notoriously economical and readily available, making them a common early building material. Black Locust is a favorite wood when making trunnels in shipbuilding in North America  and English Oak in Europe  due to their strength and rot resistance, while red oak is typical in buildings. Traditionally treenails and pegs were made by splitting bolts of wood with a froe and shaping them with a drawknife on a shaving horse. Treenails are cut from a single piece of wood and perform well because of the natural grain. The grain of the treenail runs perpendicular to the grain of the receiving mortises which adds structural strength. Treenails are typically 1.25"-1.5" (32-38 mm) in diameter and are hand whittled with rough facets. The mortise is drilled 1/16" (2 mm) smaller than the treenail to create a tight fit and take advantage of friction in the mortise. In cases where the treenail is 24 inches (61 cm) or longer, the treenail should be shaped 1/8 inch (3 mm) smaller than the other half. In the same case the mortise is drilled in two parts, with a smaller auger for the smaller part of the treenail and a typical auger for the standard part. Other trenails are tapered with the large end being 1/8" longer than the mortise. After treenails are hammered into the mortise, they can be trimmed, split, and wedged with a small piece of oak that increases friction force. As an alternative to the wedge, the treenail can receive a plug or a punch to the center that expands the entire circumference. While this method prevents leaks by reducing gaps, plugs and punches are more likely to fall out in cold temperatures. Ideally, the nose of the treenail is driven 4–5 cm clear of the timber before being trimmed. Unlike metal nails, trenails can not be removed (without great effort) or reused. As the wood shrinks or expand the fibers create a friction that interlocks it into the mortise snugly. If a treenail breaks or fails but the wood it is fastening remains intact the remaining trenail can be cut out and replaced with a larger treenail that fits snugly. In addition, treenails have the ability to move over time and retain structural integrity. Because both the mortise and the tenon are wood, the trenail does not stress the mortise to the point of failure during movement including seismic forces and grade settlement.
Early mortise and tenon trusses with spans of less than 30 feet used treenail fasteners. When used in a truss, the connecting mortises are drilled off center such that when the treenail is inserted it creates a tighter joint. Because of the large number of trenails required in a truss, the treenails can be turned on a lathe with a head and a tapered end, often kept extra-long for the tightest fit. The bottom chord often requires 2-3 pegs and is the weakest part of the truss. Hence the treenail can not prevent failure in spans of over 30 feet. In cases where significant shrinkage may occur, it may be necessary to use iron U-straps or reinforcements.
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. However, when the treenail was a different wood species than the planking it usually caused rot. Treenails and iron nails were most common until the 1780s when copper nails over copper sheathing became more popular. As late as the 1870s, the merchant navy ships used treenails and iron bolts, while the higher class ships used the copper and yellow metal bolts and dumps. In the 1870s tradition, treenails were typically used in a ratio of four treenails to one bolt with the exception that sometimes the number of bolts was increased. In later corvettes the ratio was changed to two treenails to one bolt.