Jhead is a free command line tool which crams a host of JPEG-tweaking power into its tiny 163KB executable.
The program can strip out all unnecessary metadata, reducing file size a little (occasionally, a lot), and maybe protecting your privacy.
If you’d like to be more selective then there are commands to delete individual sections of the header (IPTC, XMP, the comment field). Jhead can also extract comments from your JPGs to a file, replace them with custom text of your own, even transplant the Exif header from one image into one or more others.
The program provides various ways to tweak your JPEG timestamps. You might set all your JPEG date/ times to whatever is specified in the Exif header, say, or rename them using a custom format. If your camera clock was set incorrectly, you’re able to add or subtract a date/ time offset to restore the correct values.
There’s a command to save the thumbnails you’ll find in some JPEG headers. This might be useful if a JPEG is corrupted and you can’t view the main image, or you just need some thumbnails and don’t have any other tools to produce them.
None of this is particularly complicated to use. Jhead requires that you specify a command, then your target files, so for example this is how you’d strip out all the surplus metadata from a set of files:
jhead -purejpg c:\folder\*.jpg
Entering jhead -h at the command line provides a lot of detail on the available commands.
The program does have many plus points, though: it’s small, fast, has no dependencies, is well documented and (relatively) easy to use. If you regularly need to batch process JPEGs in this way then we’d give it a try.