In this paper, thermal effect on deflection, critical buckling load and vibration of nonlocal Euler-Bernoulli beam on Pasternak foundation using Ritz method is proposed. Equations of motion Euler-Bernoulli beam on Pasternak elastic foundation under thermal load is achieved by using energy method. Ritz method is used to solve the governing equations of motion. By this method, mass, stiffness and hardness buckling matrices are obtained. In this study, the effects of thermal, various boundary conditions, Winkler-type spring constant, Pasternak-type shear constant, non-local parameter on dimensionless deflection, critical buckling load, and natural frequency of Euler-Bernoulli beam theory are assessed. The obtained results indicate that with an increase of Winkler and Pasternak constants, the dimensionless natural frequency and critical buckling load increase, while the dimensionless deflection decreases. However, with increasing the temperature change in nonlocal Euler-Bernoulli beam on Winkler–Pasternak elastic foundation, the dimensionless natural frequency and critical buckling load decrease, while the dimensionless deflection increases. Moreover, with considering Winkler and Pasternak constants, the lower mode shape are removed and replaced with higher mode shapes.