Letterboxinator is a program that can change the ratio of an image without cropping it. It can fill the resulting empty space in three ways; using a blurred version of the origional image, using a specified color, or by repeating the edge pixels. All this is easily done through a graphical user interface, where you just drag and drop your image, and a letterboxed version of the image is placed in the same folder.
Note that all the examples here showcase a ratio of 16x9. The program can handle any ratio, including vertical ones, but 16x9 is the most common use case.
Origional image on the left, same image in 16x9 with blured background on the right. Image is of my cat. Origional image on the left, same image in 16x9 with colored background on the right. Image is by riejiu, available on twitter. Origional image on the left, same image in 16x9 with edges extended on the right. Image is by Yuutama2804, available on twitter.