The dissociative recombination (DR) of HCNH+ has been studied at the heavy ion storage ring CRYRING. The absolute cross-sections have been measured between 0.01 meV and 0.2 eV collision energy. The DR thermal rate coefficients, which can be directly applied to modeling environments in thermal equilibrium, have been found to be 2.8×10-7(300/T)0.65 at temperatures T<1000 K. The DR branching fractions have been measured for different dissociation channels: HCN(HNC)+H (0.67), CN+H2 (0.0), and CN+H+H (0.33) at collision energy of 0 eV. The results show that DR of HCNH+ is an efficient process leading to formation of HCN or HNC isomers, whereas CN production is dominated by three-body fragmentation. The multireference self-consistent calculations in a complete active space have been used as a common background for all studied species and reaction paths. Three-body fragmentation CN+H+H has been considered in one concerted elementary reaction step.