Got a folder full of .jfif files? Rename them all to .jpg with one line. This covers the batch rename jfif to jpg process on Windows, macOS, and Linux using tools already on your machine. The rename is instant and lossless. The image data inside a .jfif file is already JPEG. No extra software required.
Why Renaming Works (and is Safe)
A .jfif file is a JPEG image wearing the wrong extension. The JFIF standard is the same format as .jpg. Changing the extension does not touch the image data. The rename happens on your file system, not inside the file, so it is instant and lossless.
If a file with the same .jpg name already exists, the rename for that file fails rather than overwriting anything. Want a safety net? Copy the folder first.
Windows Using Command Prompt
Open a Prompt in the Folder
Open the folder that contains your .jfif files. Click inside the File Explorer address bar, type cmd, and press Enter. A Command Prompt window opens with that folder as the current directory.
Run the Rename
Type this line and press Enter:
ren *.jfif *.jpg
Every file ending in .jfif becomes .jpg. The asterisk matches any filename. The rename happens instantly. If a .jpg with the same base name already exists, that particular file is skipped and you see an error for that file only.
Windows Using PowerShell
PowerShell gives you more control. It ships with every modern version of Windows.
Open PowerShell in the Folder
Open the folder containing your .jfif files. Right-click inside the folder and select "Open in Windows Terminal" or "Open PowerShell here" (the wording depends on your version). You can also type powershell in the File Explorer address bar and press Enter.
Run the Rename
In the PowerShell window, paste this line and press Enter:
Get-ChildItem *.jfif | Rename-Item -NewName { $_.BaseName + '.jpg' }
What each part does:
- Get-ChildItem *.jfif finds all .jfif files in the current folder.
- The pipe symbol | sends that list to the next instruction.
- Rename-Item -NewName { $_.BaseName + '.jpg' } renames each file, keeping the original base name and adding the .jpg extension.
This handles filenames with spaces. The rename is instant and lossless.
MacOS and Linux Using the Terminal
On macOS or Linux, use the Terminal with a shell loop. It works in the default shell, bash or zsh.
Open Terminal in the Folder
On macOS, open Terminal and navigate to the folder with cd. Example: cd ~/Downloads/jfif-files. On Linux, open your terminal emulator and navigate the same way.
Run the Rename Loop
Paste this and press Enter:
for f in *.jfif; do mv "$f" "${f%.jfif}.jpg"; done
What the loop does:
- for f in *.jfif loops through every file ending in .jfif in the current folder.
- mv "$f" "${f%.jfif}.jpg" renames each file by stripping the .jfif extension and adding .jpg.
- The double quotes protect filenames with spaces or special characters.
The rename is instant and lossless. If a .jpg with the same name already exists, the move instruction shows an error and skips that file.
What If You Have Subfolders?
The instructions above rename only the current folder. To reach .jfif files nested inside subfolders, switch tactics.
Windows Command Prompt (Subfolders)
The ren instruction does not work recursively. Use a for loop or switch to PowerShell.
Windows PowerShell (Subfolders)
Add the -Recurse parameter to Get-ChildItem:
Get-ChildItem *.jfif -Recurse | Rename-Item -NewName { $_.BaseName + '.jpg' }
macOS / Linux Terminal (Subfolders)
Use find to locate files and pipe them into the rename loop:
find . -name "*.jfif" -exec bash -c 'mv "$1" "${1%.jfif}.jpg"' _ {} \;
This finds every .jfif file starting from the current directory, including subdirectories, and renames it. The rename remains instant and lossless.
Before You Start Backup Advice
Renaming is safe because the image data is unchanged. But if you are unsure, make a backup. Copy the entire folder to a different location before running any rename. That way, if you change your mind, you keep the original .jfif files.
The rename operations described here do not delete the originals. They only change the file extension. If you accidentally rename a file to a name that already exists, the operation fails for that file and leaves the original untouched.