The 5-axis CNC (Computer Numerical Control) machining plays an important role in manufacturing, especially in making parts of complex shapes such as turbine or propeller blades. However, there are always challenges of generating 5-axis CNC machining programs when working with different 5-axis CNC machines of various structures; and 5-axis CNC programs must be automatically generated by CNC postprocessors which calculate the inverse kinematics and convert the Cutter Location data to the CNC programs that are used for operating 5-axis CNC machines. Since the family of 5-axis CNC machines has a wide spectrum of machine configurations, with hundreds of mechanisms of 5 degrees of freedom, it is therefore practically challenging for engineers and CNC machine operators to create CNC postprocessors for specific 5-axis CNC machines. It is more challenging to create CNC postprocessors if engineers or CNC operators do not have strong backgrounds and professional skills in mathematical modeling and kinematics of machines. This paper presents a universal and intuitive framework and practical guidance to create CNC postprocessors for all 5-axis CNC machines, with the focus on a novel mathematical formulation of inverse kinematics of three main groups of 5-axis CNC machines. The case studies of creating CNC postprocessors with the commercially available 5-axis CNC machines were successfully demonstrated, in which the simulation scenarios and experiments were implemented to verify the created CNC postprocessors. The proposed frameworks and guides for generating CNC postprocessors can be conveniently and effectively applied in industrial practices, without the required strong backgrounds and skills for engineers or CNC operators in mathematical modeling and kinematics of machines, especially mathematical modeling of multibody systems.