Watershed subdivision is a useful discretization method for distributed hydrological models at large river basins. A subwatershed codification method, which is able to identify the subwatershed uniquely and reflect the topological relationship is desired. According to the previous literatures, there are two types of coding methods suitable for the subwatershed codification: the Pfafstetter-group rules and the modified binary tree codification method. But, both of them have some shortcomings in theory and application. A new coding method named stem-branch topological codification is developed to overcome these shortcomings, which is based on the stem-branch topological structure of the drainage networks and capable of reflecting the river hierarchy. The basic coding elements of the method are river reaches in the drainage networks, which are not only generated by the tributary junctions, but also by the splitting points of hydrological factors (e.g. hydrological gauge stations and reservoirs). Also, the method could handle complex confluences (e.g. river reaches with more than two upstream inflows), which are rare under natural conditions, but more frequent in the digital elevation model extracted or artificial drainage networks (e.g. sewage systems or irrigation drainage networks). With the stem-branch topological codification codes, it is easy to identify the upstream (or downstream) relationship between any two subwatersheds and to calculate the directly connected subwatershed codes. Also, if some changes have occurred in the drainage network, there is no need to recode the whole watershed, but by modifying the existed codes to form the new ones. Copyright © 2013 John Wiley & Sons, Ltd.