New Hampshire Route 31 begins at the Massachusetts border as a continuation of Massachusetts Route 31. Entering the rural southwestern panhandle of the town of Mason, it intersects New Hampshire Route 124 within 500 yards (460 m) of the Massachusetts border. After a similar distance, it enters the town of Greenville, where it forms the primary north–south road through town.
Entering the town of Wilton, it crosses the Souhegan to the west bank and heads towards the main village of Wilton at the town's northeastern corner. Known locally as Greenville Road over this stretch, it merges with NH 101 to follow Gibbons Highway, crosses the Souhegan again as it enters Wilton Village, leaves NH 101 and turns north on Island Street to cross both the Souhegan and Stony Brook, then turns northwest along Forest Road at an intersection with Main Street. Now following Stony Brook, it crosses over it several times before crossing the town's northern border and entering the rural town of Lyndeborough. Passing through the modern village near the southwestern corner of town (the historic village is located at Lyndeborough Center Historic District some distance away), it continues along Forest Road until it leaves to the northwest into the town of Greenfield, New Hampshire.
In Greenfield, it is still known as Forest Road, and passes the northern slopes of North Pack Monadnock Mountain and the southern slopes of Crotched Mountain. In the central village of Greenfield, it has a brief concurrency with NH 136, then leaves Forest Road along Sawmill Road to the northwest, entering Bennington, where the name changes to Greenfield Road. Winding through several streets of the main village of Bennington, including Main Street, Francestown Road, and Old Hancock Road, it meets the western terminus of NH 47 and passes by dam at the north end of Powder Mill Pond reservoir near the Great Falls of the Contoocook River, and then merges with US 202.
Heading north along with US 202, the two routes enter the town of Antrim, New Hampshire, following Main Street into the main village of Antrim at the town's southeastern corner, where US 202 leaves towards the northeast, while NH 31 follows Main Street to the northwest. Changing names to Clinton Road, NH 31 follows the Great Brook northwest, and then turns due north to the village of Antrim Center. Turning again northwest, it meets NH 9 at a T-intersection, and turns right to follow eastbound NH 9 in a northeasterly direction along Keene Road. Curving around the shores of Franklin Pierce Lake, the two routes enter the town of Hillsborough, where NH 31 leaves to the northwest along Second New Hampshire Turnpike at the lake's northern tip. Heading first northwest, then west, along Second New Hampshire Turnpike, the route leaves Hillsborough, crosses the northern tip of the town of Windsor, it next enters Washington.
In Washington, the route turns in a generally northwesterly direction, it passes through the central village of Washington, along Main Street, before heading towards Pillsbury State Park at the town's northern end. Entering the town of Goshen, New Hampshire as Washington Road, it reaches its northern terminus at NH 10 in a rural area south of Goshen's main village.