Abstract This study attempts to optimize the geometric cross-section dimensions of raised pedestrian crosswalks (RPC), employing safety and comfort measures which reflect environmental conditions and drivers behavioral patterns in Qazvin, Iran. Geometric characteristics including street width, ramp lengths, top flat crown length and height, and 4672 spot speed observations of 23 implemented RPCs were considered. The authors established geometric and analytical equations to satisfactorily express the discomfort that vehicle occupants experience while traversing an RPC and the crossing risk to pedestrians. Artificial neural networks (ANN) are reputed for their capability to learn and generalize complex engineering phenomena and were therefore adopted to cope with the highly nonlinear relationship between the before-RPC spot speeds, the geometric characteristics, and spot speeds on the RPC. This on-RPC spot speed has been utilized for computing the above-mentioned criteria. Combining these criteria, a new judgment index was created to identify the optimum RPC which fulfills the highest comfort and safety levels. It was observed that the variable with the highest impact is the second ramp length, followed by the first ramp length, top flat crown length, before-RPC spot speed, height, and street width, in order of magnitude.