.LNK

LNK File

Windows Shell Link (Shortcut)
Ask a question
QUICK ANSWER

A .lnk file is a Windows Shell Link, the shortcut format Windows has used since Windows 95. Double-clicking it opens the target program or file; the shortcut itself holds no data. If all your files suddenly turned into .lnk icons, a shortcut virus hid the originals - they are still there. And yes, a .lnk received by email can be dangerous.

Developer: Microsoft Category: System Files Open standard MIME: application/x-ms-shortcut
OPENS ON Windows macOS Linux
Related: .NOMEDIA · .DLL · .TMP · .PKG

On this page

19k+ extensions indexed
Last reviewed Aug 9, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the LNK file format?

.lnk files are the shortcut files used in the Windows system. They contain information about the type and location of the target - identified by a local path, UNC share, or Shell Item ID list - and about the associated program.

.lnk files may contain additional, user-defined information. If they are associated with an .exe application, they can also indicate initial startup attributes for the program they refer to, such as window state, working directory, and command-line arguments. In Windows, .lnk files display the same icon as their target file. The .lnk extension is hidden in the filename by default and does not appear in File Explorer.

The binary format is documented by Microsoft as the MS-SHLLINK specification (published 2010). Every .lnk file opens with a fixed 76-byte header: magic bytes 4C 00 00 00 followed by the fixed shell link class CLSID. Related shortcut formats include .url (internet shortcut) and .pif (legacy DOS program shortcut).

When an .lnk shortcut stops working

Changing some parameters of the target file - such as its name or location - results in disabling all shortcut files that lead to it. Changes to drive letters or network share mappings can also cause desktop shortcuts to disappear. Windows includes a link-tracking service that attempts to repair broken shortcuts automatically; when it fails, re-creating the shortcut or updating the target path via the *Properties* dialog is the recommended fix.

Security & safety

RISK: HIGH

LNK is one of the most abused initial-access formats on Windows. A shortcut can silently launch cmd/PowerShell with attacker-controlled arguments and a disguised icon (PDF, folder); since Microsoft blocked internet Office macros in 2022, LNK inside ZIP/ISO e-mail attachments became a primary malware vector. Historic LNK flaws include CVE-2010-2568 (Stuxnet, icon-parsing code execution) and ZDI-CAN-25373 / CVE-2025-9491 - whitespace-padded arguments hiding the real command in the Properties dialog, exploited by 11+ state-sponsored groups since ~2017 and patched by Microsoft only in the November 2025 updates. Rules for users: never double-click a .lnk that arrived by e-mail/USB, inspect it with LECmd/ExifTool instead, and keep Windows updated. 'Shortcut virus' on USB drives hides folders and replaces them with malicious shortcuts - clean with an AV scan plus attrib, don't just delete the links.

Format details

in a nutshell
FULL NAMEWindows Shell Link (Shortcut)
DEVELOPERMicrosoftsince 1995 (Windows 95); binary format publicly documented since 2010 as MS-SHLLINK
CATEGORYSystem Files
MIME TYPEapplication/x-ms-shortcut
TYPEBinary shell link / shortcut metadata (not a document)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102030405060708090a0b0c0d0e0f10111213
HEX
4C0000000114020000000000C000000000000046
ASCII
L··················F
First 4 bytes = HeaderSize 0x0000004C; bytes 4-19 = fixed shell link class ID.

Programs that open LNK files

Windows3 apps
Microsoft Windows (File Explorer) Built-in Double-click runs the target. Right-click → Properties shows the Target field; 'Open file location' jumps to the real file. To repair a broken .lnk association, delete HKCU\...\FileExts\.lnk\UserChoice and restart Explorer.
LECmd (Eric Zimmerman) Free Command line: LECmd.exe -f file.lnk - dumps full metadata (target, timestamps, machine ID) without executing anything; forensic standard.
ExifTool Open-source exiftool file.lnk prints target path, arguments and machine metadata safely (no execution); also works on macOS/Linux.
macOS1 app
ExifTool Open-source exiftool file.lnk shows the Windows target path - useful when a .lnk arrived instead of the real document.
Linux2 apps
liblnk (lnkinfo) Open-source Install liblnk-utils, then lnkinfo file.lnk to inspect the shortcut's target and metadata.
ExifTool Open-source exiftool file.lnk to read the target path the shortcut refers to.

Technical details

deep spec
Container typeFixed-length binary header (76 bytes) followed by variable-length optional data blocks
Magic bytes4C 00 00 00 01 14 02 00 … C0 00 … 46 - first 4 bytes encode the header size; bytes 4-19 hold the fixed shell link class CLSID, both at offset 0
MIME typeapplication/x-ms-shortcut
Byte orderLittle-endian throughout all numeric fields
String encodingCode-page (ANSI) or Unicode (UTF-16 LE); a flag in ShellLinkHeader indicates which encoding is present
Target reference typesLocal file or folder path, UNC network path, volume root, or environment-variable-expanded path via EnvironmentVariableDataBlock
Key data structuresShellLinkHeader, LinkTargetIDList (ITEMIDLIST), LinkInfo, StringData blocks, ExtraData blocks - all optional except the header
Window state fieldShowCommand in the header: 1 = Normal, 3 = Maximized, 7 = Minimized
Hotkey field16-bit value in the header combining a VirtualKey code with modifier flags (Shift, Ctrl, Alt)
Relative path supportOptional RelativePath string allows the Windows shell to self-repair a broken shortcut when the target is moved within the same volume
Embedded target timestampsFileTime values for target creation, last write, and last access are stored in LinkInfo, making .lnk files valuable artifacts in digital forensics
Icon storageSeparate IconLocation path string plus an integer IconIndex pointing to the icon resource within that file
Extension visibilityHidden by Windows shell by default; controlled by the HideFileExt value under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
Security historyExploited by Stuxnet (CVE-2010-2568): malicious .lnk files triggered code execution at icon-render time; patched in MS10-046 (August 2010)
Platform supportNative to Windows 95 and all later Windows versions; parseable on Linux and macOS via liblnk (lnkinfo) and ExifTool
Released1995 (Windows 95); binary format publicly documented since 2010 as MS-SHLLINK
Open standardYes · royalty-free
Specificationlearn.microsoft.com

LNK conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with LNK files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about LNK files.

Frequently asked questions

All my files turned into .lnk shortcuts - how do I get them back?
Your files are almost certainly hidden by a 'shortcut virus', not lost. Scan with an antivirus, then unhide: open Command Prompt and run attrib -h -r -s /s /d X:\*.* (replace X: with the drive). Delete the leftover .lnk files afterwards.
Every shortcut now opens with Notepad/Word - how do I fix the .lnk association?
You told Windows to 'always open' .lnk with that program. Fix: in Registry Editor delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lnk\UserChoice, then restart Explorer or reboot.
Is a .lnk file dangerous?
It can be. A shortcut can run any command with hidden arguments and a fake icon. Treat .lnk files received by e-mail, in archives or on found USB drives as hostile; inspect with LECmd or ExifTool instead of double-clicking.
How do I see what a shortcut points to?
Right-click → Properties → Shortcut tab → Target. Since the November 2025 Windows update the dialog shows the full command including long arguments (earlier, malware could hide them with whitespace padding).
Can I open a Windows .lnk file on a Mac or Linux?
Not to launch it - the target is a Windows path that doesn't exist there. You can read what it points to with ExifTool or lnkinfo. If someone meant to send you a document, they sent the shortcut by mistake; ask for the actual file.
Why don't I see the .lnk extension even with extensions enabled?
Windows always hides it via the NeverShowExt registry flag on the lnkfile type, so shortcuts show only the curled-arrow icon. Malware abuses this to disguise 'invoice.pdf.lnk' as 'invoice.pdf'.

References

1Microsoft - [MS-SHLLINK]: Shell Link (.LNK) Binary File Formatlearn.microsoft.com
2Trend Micro ZDI - ZDI-CAN-25373: Windows shortcut exploited by state actorswww.trendmicro.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BCBitComet Incomplete Download File
3.CRDOWNLOADChrome Partial Download File
4.MDMarkdown Document
5.PARTPartial Download File
6.BINCD/DVD Disc Image (BIN/CUE)
7.EXEWindows Executable (Portable Executable)
8.RPMSGRestricted Permission Message
9.AVIFAV1 Image File Format (AVIF)
10.NOMEDIAAndroid No-Media Marker File

Related extensions

.NOMEDIAAndroid No-Media Marker File
.DLLDynamic Link Library
.TMPTemporary File
.PKGmacOS Installer Package
.ETLEvent Trace Log
.ASECAndroid Secure Encrypted Container (apps-on-SD container)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z