URL File Documentation


Summary

A URL (Internet Shortcut) file is a tiny Windows text file that stores a single web address and opens it in your default browser when double-clicked. It is not a saved web page and holds no page content, only the link. Its MIME type is application/x-mswinurl, and it is a plain INI file beginning with [InternetShortcut] then a URL= line. To read the address without visiting it, right-click → Properties, or open the file in Notepad.

Technical details

FeatureValue
Full nameInternet Shortcut
File extension.url
MIME typeapplication/x-mswinurl
Format typePlain-text INI-style shortcut to a web address
DeveloperMicrosoft
Introduced1996 (Internet Explorer 3 / Windows)
Open standardPartial — simple documented INI format
EncodingPlain text (INI); no binary signature
First line[InternetShortcut] (section header)
Essential fieldURL= the target web address
Optional fieldsIconFile=, IconIndex=, HotKey=
Contains page contentNo — it is a pointer, not the page
Stored in (IE favorites)%UserProfile%\Favorites
Opens withDefault web browser (double-click); any text editor (to read)
Mac equivalent.webloc (XML plist holding a URL)
Related extensions.lnk, .website, .webloc, .html
Specificationlearn.microsoft.com (Internet Shortcuts reference)
Structure at a glance

A .url file has no binary magic number — it is a small plain-text INI file. It always begins with the section header [InternetShortcut], followed by the only required line, URL=https://example.com. Optional lines may add a custom icon: IconFile= and IconIndex=. Because it is text, open it in any editor to read or change the target. A minimal file is just: [InternetShortcut] then URL=https://example.com.

What is a URL file?

A .url file is the Windows Internet Shortcut format, introduced with Internet Explorer 3 in 1996. It is a small plain-text file, in the classic INI layout, that stores one thing: a web address. Double-click it and Windows opens that address in your default browser. The single most important fact about it is that a .url is a pointer, not content: it does not contain the web page, its text, images or any PDF behind the link. It only holds the link itself.

You get a .url file by dragging the icon from a browser’s address bar onto the desktop, by choosing “Add to favorites” in Internet Explorer (favorites are stored as .url files under %UserProfile%\Favorites), or when someone shares a saved bookmark. Because it is just text, the reliable way to see what it points at is to open it in Notepad and read the URL= line, which is exactly how most people resolve their question about one.

The [InternetShortcut] section and its keys

An Internet Shortcut is an INI file: a bracketed section header followed by key=value lines. The whole meaningful content is usually two lines.

[InternetShortcut]
URL=https://www.example.com/page
IconFile=C:\Windows\System32\shell32.dll
IconIndex=13

The [InternetShortcut] header is always the first line and identifies the file’s purpose to the Windows shell. The only essential key is URL=, which holds the target address; everything else is optional. IconFile= and IconIndex= tell Windows which icon to draw for the shortcut — often a path plus an index into an icon resource, or a downloaded favicon. Windows may add further keys such as HotKey= or an IDList= binary blob, but a shortcut with just the header and a URL= line is completely valid. Since the format is plain text, editing where a shortcut points is as simple as changing the URL= line in a text editor and saving.

A pointer, not a page: why “convert to HTML/PDF” misleads

Much of the confusion around .url files comes from expecting them to contain a saved page. They do not. This has direct consequences for “converting” one:

URL → HTML   nothing to convert: there is no page inside. To save the page,
             open the link and use the browser's Save As → "Webpage, Complete".
URL → PDF    no document to render. Open the link, then Print → Save as PDF.
URL → TXT    trivial: a .url already IS text. Rename to .txt or open in Notepad.
URL → webloc make a Mac shortcut: copy the URL= value into a .webloc plist.

If the target site is offline, deleted, or behind a login, the .url is effectively useless on its own, because it never stored a local copy of anything. To turn the link itself into a clickable HTML file you would paste the URL= value into an <a href> element by hand; that is a text rewrite, not extraction of saved content. The honest workflow for archiving a page is always: open the link, then save or print the live page.

URL versus LNK versus webloc

Windows has two different “shortcut” formats, and they are not interchangeable. A .url is a text Internet Shortcut pointing to a web address. A LNK is a completely different binary format (the Shell Link format) that points to a local file, folder or program on the machine; it starts with a fixed header and stores a target path, not a URL. You cannot meaningfully convert one to the other because they point at different kinds of target: a web address has no local file for a .lnk to reference.

On macOS the equivalent of a .url is a .webloc file, which stores a URL inside an XML property list rather than an INI section. macOS does not natively launch a Windows .url on double-click, so on a Mac the practical move is to open the .url in TextEdit, copy the address, and paste it into the browser (or drag the address from Safari’s address bar to create a native .webloc). Modern browsers on Windows — Chrome, Edge, Firefox — all open .url files, and any text editor reads them on any platform.

A .url file contains no executable code and cannot run a program by itself, but it is still a link, and links carry risk in two concrete ways.

First, phishing. The filename is arbitrary and tells you nothing about the destination: a file called Invoice.url can point anywhere. Treat a .url received by email or chat exactly like a suspicious link — read the destination before double-clicking by right-clicking → Properties (the Web Document tab shows the target) or opening it in Notepad to read the URL= line. Second, and more subtle, is credential leaking through the icon fields. Windows has had abuses where a crafted .url file set IconFile= (or a related property) to a remote UNC path like \\attacker\share\icon.ico. When the shell rendered the shortcut’s icon it reached out over SMB to that path and, in doing so, sent the user’s NTLM authentication handshake to the attacker’s server — leaking a hash that can be cracked or relayed, with no click required beyond viewing the file. The defence is the same as for any untrusted attachment: do not open .url files from senders you do not trust, and keep Windows patched, since Microsoft has fixed several such handler flaws over the years.

Frequently asked questions

How do I see the web address inside a URL file?

Right-click the file → Properties → Web Document shows the target URL without opening it. Or open the file in Notepad (or TextEdit on Mac) and read the line that starts with URL=. Reading it first is the safe habit, since the filename does not reveal the destination.

Does a URL file contain the web page?

No. It stores only the link, not the page’s text, images or any PDF. To keep the actual content, open the link and save or print the page (for example Print → Save as PDF). If the site is gone, the .url cannot recover it.

What is the difference between a URL and a LNK file?

A .url is a text Internet Shortcut pointing to a web address; a LNK is a binary Windows shortcut pointing to a local file, folder or program. Different formats for different targets, and not convertible into each other.

References