European trains are equipped with a pneumatic braking system that has to respect severe specifications concerning both performances and safety. The pneumatic braking system is composed of hundreds of different pneumatic components that reproduce the prescribed response by a complex logic of pneumatic and mechanical elements. In this paper a tool for a complete simulation of the pneumatic braking system is described, it was developed using the Matlab-Simulink numerical environment.The tool is composed of three different libraries of pneumatic components. The first includes the elementary components such as pipes, orifices, valves and the reservoir. By assembling elementary components, an advanced user can build a customized version of general pneumatic components or plants. Complex components of general use for railway pneumatic brake such as brake cylinders, distributors, pressure transformers and brake valves are available in a second library that can be used to assemble a customized braking plant for a vehicle. The last library is composed of macropneumatic subsystems that reproduce the braking system of a typical railway vehicle. Many common plant layouts are reproduced in this library (freight car, passenger coaches, locomotives, etc.).The pneumatic brake system of a train can be simulated by assembling in a single Matlab-Simulink model the elements of the library.In this paper the main features of this numerical tool and the test procedures developed to validate the software are described. Experimental data have been kindly supplied by Trenitalia SPA and they are referred to several test campaigns managed by Italian railway in order to verify and release existing components of the pneumatic brake.