Introduction
A .webloc file is a macOS
shortcut to a web page. Dragging an address from Safari’s address bar, or a link from a
page, to the desktop or a Finder window makes one, and opening it starts the default
browser at that address. It is the Mac’s counterpart of the Windows
.url Internet shortcut.
Very old files kept the address in the file’s resource fork, which is lost when the file is copied to other systems; current macOS writes it in the file’s ordinary contents.
Structure
A webloc file is an Apple property list holding a
dictionary with one key, URL, whose value is the address as a string. It
may be saved as XML or as a binary property list starting with bplist00.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://fileformats.org/</string>
</dict>
</plist>
Links
Software
- Finder – opens website locations in the default browser (macOS)
- Safari – Apple’s web browser, which makes them when an address is dragged out (macOS)
- plutil – built into macOS, prints and converts them like any property list (macOS)