How extensions work

An extension follows the last dot in a name and points operating systems toward the right program. Double-clicking photo.jpg opens an image viewer because the system reads .jpg first.

Older systems allowed only three characters after the dot, which is why .jpg, .tif, and .gif are short while newer formats like .webp can use the full length.

When the extension is wrong

The extension is a label, not a guarantee. Renaming a PNG to .jpg changes nothing inside the file, and software that reads the actual data will still see PNG content.

Mismatches cause real trouble. Upload forms and servers may trust the extension, reject the file, or display it incorrectly, so keeping name and content aligned avoids needless failures. Tools that read file headers instead identify the true format regardless of the name on disk.

  • jpg and jpeg: JPEG images
  • png: lossless images with transparency
  • webp: modern images, static or animated
  • pdf: page documents
  • zip: compressed archives

Changing a file type properly

To change a file type, convert the contents rather than the name. Conversion re-encodes the data so the extension, the MIME type, and the actual format all agree.

Filekind converts JPEG, PNG, and static WebP into each other in the browser, producing a genuinely new file with the matching extension rather than a renamed copy. The same logic applies when an extension is missing entirely, since the contents are unchanged and can still be opened.