Built-in wallpapers
A copy of the current wallpaper can be found by entering one of the below paths in Windows File Explorer address bar.
Path 1 -
%AppData%\Microsoft\Windows\Themes\CachedFiles
Path 2 -
%AppData%\Microsoft\Windows\Themes\TranscodedWallpaper
Note: TranscodedWallpaper does not have a file extension, even though it is a JPEG image file.
To view the image, right click on the file and use "Open With" option; or select the image and press Enter.
This will bring up the "Select an app to open..." or "How do you want to open this file?" dialogue box. Any popular image viewer should work - such as the "Windows Photo Viewer" or the "Photos" app.
Alternatively, drag and drop the file into a Firefox tab or mspaint window to view/edit.
Note for Windows 10/11: The above locations have limitations. For example, if the wallpaper you're looking for is no longer visible in the 'Background' tab in the Settings app, you can't recover it. It will work for your last five wallpapers but nothing older. 1
Path 3: Default Windows wallpapers -
%SystemRoot%\Web
Check in one of the below folders -
- "4K" for 4K wallpapers,
- "Screen" for lock screen backgrounds,
- "touchkeyboard" for colorful abstract backdrops in Windows 11 2
- "Wallpapers" for default Windows wallpapers
Path 4: Wallpapers from installed themes (Aero, etc.) -
%SystemRoot%\Resources\Themes
Path 5 [wallpapers from per-user installed themes (including pre-installed themes from OEM)] -
%LocalAppData%\Microsoft\Windows\Themes
Path 6: If Windows Photo Viewer was used to set desktop wallpaper -
%AppData%\Microsoft\Windows Photo Viewer\
Slideshow or user specific wallpapers
If the wallpaper is set by Windows Slideshow or manually set by a user, try one of the below scripts.
The code will attempt to extract the original location of the image by decoding binary data from below key in the Windows Registry .
Key Name: HKEY_CURRENT_USER\Control Panel\Desktop
Value Name: TranscodedImageCache
Windows Slideshow -

Manually set wallpaper - e.g., right click on image file and select "Set as desktop background"

Script 1 - vbs
- To decode the registry key and view the image in Windows Explorer, follow the instructions listed on ElevenForum.com; or
- Open Notepad to save below code in a
.vbs file and run it.
Only ASCII compatible. Read the warning written below the code.
The contents of vbs file 5 -
Const HKCU = &H80000001 'HKEY_CURRENT_USER
sComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" _
& sComputer & "\root\default:StdRegProv")
sKeyPath = "Control Panel\Desktop"
sValueName = "TranscodedImageCache"
oReg.GetBinaryValue HKCU, sKeyPath, sValueName, sValue
sContents = ""
For i = 24 To UBound(sValue)
vByte = sValue(i)
If vByte <> 0 And vByte <> "" Then
sContents = sContents & Chr(vByte)
End If
Next
CreateObject("Wscript.Shell").Run "explorer.exe /select,""" & sContents & """"
Note: The vbs didn't work for me when I first set up the Slideshow, but it worked after changing to the next image in the Slideshow.
Warning: This vbs code does not work if the file name contains non-ASCII characters, i.e., if Unicode characters (like Δ, Й, ק ,م, ๗, あ, 叶, 葉, 말) are present in the file name, then the vbs code above will fail to locate the image in Windows Explorer.
Script 2 - PowerShell 8
ASCII + Unicode compatible

$TIC = (Get-ItemProperty 'HKCU:\Control Panel\Desktop' TranscodedImageCache -ErrorAction Stop).TranscodedImageCache
$result = [System.Text.Encoding]::Unicode.GetString($TIC) -replace '(.+)([A-Z]:[0-9a-zA-Z\\])+','$2'
Set-Clipboard -Value $result

Script 3 - AHK
ASCII + Unicode compatible
- Download and install AutoHotkey
- Open Notepad and save below code as
.ahk file
- Run
.ahk file
- Press Win + W and the location of the wallpaper will be displayed as a message box.
#Requires AutoHotkey v2.0
#SingleInstance force
; #HotIf WinActive("ahk_class WorkerW ahk_exe explorer.exe")
; commented out - enable shortcut on desktop only
#W::{ ; Win + W
MsgBox "WallpaperPath_v4`n" WallpaperPath_v4(ThisHotkey),, 262144 ; 262144 = Always-on-top
}
; #HotIf
;-------
; User-defined functions
; below code was modified from v1 - https://gist.github.com/raveren/bac5196d2063665d2154#file-aio-ahk-L741
; This source has code for multi-monitor setups that is not included here.
; Look for openWallpaperUnderMouse() and getMonitorUnderMouse() functions over there if you need it.
WallpaperPath_v4(key := A_ThisHotkey) {
; Read the binary value from the registry
regBinary := RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "TranscodedImageCache") ; 1600 characters
; alternative: regBinary := RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "TranscodedImageCache_000")
; remove first 48 characters and create array
regArr := StrSplit(SubStr(regBinary, 49))
; variable that stores path
ConvString := ""
Loop regArr.Length {
If Mod(A_Index, 4) != 0 ; generate char every 4th Loop, when mod() = 0 (division remainder)
Continue ; skip rest of the Loop if A_Index is 1 2 3 (not 4) 5 6 7 (not 8) 9…
Else ; in Loop 4, 8… reposition characters as Chr("0x" [3] [4] [1] [2]), Chr("0x" [7] [8] [5] [6])… and so on
char := Chr("0x" regArr[A_Index - 1] regArr[A_Index] regArr[A_Index - 3] regArr[A_Index - 2])
If char = "" ; char := Chr("0x" 0 0 0 0) consecutive zeroes results in empty string
Break ; End Loop
Else ConvString .= char ; add generated string to path
}
If FileExist(ConvString)
Return ConvString ; Return path to desktop wallpaper
Else {
MsgBox key ":: WallpaperPath() is not valid!nConverted String: " ConvString "nnTranscodedImageCache:n" regBinary,, 262144 ; 262144 = Always-on-top
Exit
}
}

For other iterations of this code, visit this AHK v2 script on GitHub.
Bonus Info
If you are looking for the location of Lock Screen images, visit this SuperUser question.
Note on 3rd party apps
When 3rd party apps like John's Background Switcher are used to manage desktop backgrounds (which I used on my older Win10 PC), they typically provide an option to view the current/previous desktop background (if set by the app itself). Check the app's help file to know more.
- To activate Windows Photo Viewer in Windows 10, visit this article on HowToGeek.
- To download default wallpapers from every Windows version, visit this article on XDA.
- To download every Bing wallpaper in 4K, visit this page on GitHub.