Open the image in an editor such as Photoshop, GIMP, Paint.NET, or Preview
Find the image size, print size, or resolution settings
Locate the DPI or PPI field
Enter the desired DPI value
Keep or uncheck resampling depending on whether you want to change only metadata or also pixel dimensions
Save the image as a new file
Use export or save as options if the editor does not allow direct DPI editing
For batch changes, use an image converter or command-line tool
Verify the DPI in the file properties after saving
