<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPasteboard/PasteboardType/URL",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSPasteboardTypeURL"
  },
  "title" : "URL"
}
-->

# URL

URL data for one file or resource.

```
static let URL: NSPasteboard.PasteboardType
```

## Discussion

In macOS 10.6 and later, use [`writeObjects(_:)`](/documentation/AppKit/NSPasteboard/writeObjects(_:)) to write URLs directly to the pasteboard instead.

In macOS 10.5 and earlier, write an URL to a pasteboard using the <doc://com.apple.documentation/documentation/Foundation/NSURL/write(to:)> method of <doc://com.apple.documentation/documentation/Foundation/NSURL>. To get an URL from a pasteboard, use the <doc://com.apple.documentation/documentation/Foundation/NSURL/init(fromPasteboard:)> method of <doc://com.apple.documentation/documentation/Foundation/NSURL>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)