What is the WEBLOC file format?
A .webloc file is a shortcut used for storing a website location, created by macOS and supported by Apple's Safari and other browsers. Internally, the file is an Apple property list - plain XML or a binary bplist00 file - holding a single URL key. The .webloc file saved on the desktop is created by dragging the website icon placed next to the address field from the web browser. When the user opens the .webloc file, the associated website can be launched in Safari, Chrome, Firefox, or any default browser. Note that older files stored the URL in a resource fork and may appear empty when copied to Windows or Linux; the Windows counterpart is the .URL internet shortcut.
Security & safety
RISK: LOWA .webloc is a tiny text file that holds a single URL and contains no executable code, so the file itself is harmless. The only risk is the destination: like any shortcut or link, a .webloc can point to a phishing or malware site, so treat an unexpected .webloc the same as an unexpected link - check the URL inside (open it as text) before opening it in a browser.
Format details
in a nutshellPrograms that open WEBLOC files
Technical details
deep spec| Format type | Apple property list (plist) file containing one URL entry |
| Encoding variants | XML text (UTF-8) or binary plist; most modern files are XML, drag-created shortcuts may be binary plist |
| XML header | XML-plist files begin with `<?xml version="1.0"?>` and a `<!DOCTYPE plist` declaration, with the URL inside a `<dict>` block |
| Binary plist signature | Binary variant begins with ASCII `bplist00` at byte offset 0 (hex 62 70 6C 69 73 74 30 30) |
| Internal URL key | Target address stored under the plist key `URL`; no other keys are required by the format |
| MIME type | `application/x-webloc` |
| Creation method (GUI) | Drag the favicon or site icon from the browser address bar to the macOS desktop or a Finder folder |
| Resource fork (legacy) | Older files stored the URL in the HFS+ resource fork; copying to FAT32/NTFS/ext4 strips the fork, making such files appear empty |
| Platform support | Native to macOS (Finder); not natively recognized on Windows or Linux - a text editor is needed to extract the URL |
| Execution behavior | Double-clicking opens the stored URL in the system default browser; the file contains no executable code |
| Typical file size | 200-600 bytes for an XML-plist file; binary plist variant is similar or slightly smaller |
| Developer | Apple Inc. - part of the Cocoa / CFPropertyList framework |
| Cross-platform transfer | Modern XML-plist `.webloc` files copy to any OS intact; any text editor or XML parser can read the embedded URL |
| Windows equivalent | The `.url` internet shortcut (INI-style plain-text file) serves the same purpose on Windows |
| Programmatic creation | Can be generated with `PlistBuddy`, Python's `plistlib` module, or any library that writes Apple property lists |
| Released | Mac OS X (Safari era, early 2000s); modern XML-plist form since ~10.4 |
| Specification | developer.apple.com |
WEBLOC conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about WEBLOC files.