<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSData/description",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSData(py)description"
  },
  "title" : "description"
}
-->

# description

A string that contains a hexadecimal representation of the data object’s contents in a property list format.

```
var description: String { get }
```

## See Also

[`getBytes(_:)`](/documentation/Foundation/NSData/getBytes(_:))

Copies a data object’s contents into a given buffer.

[`bytes`](/documentation/Foundation/NSData/bytes)

A pointer to the data object’s contents.

[`getBytes(_:range:)`](/documentation/Foundation/NSData/getBytes(_:range:))

Copies a range of bytes from the data object into a given buffer.

[`getBytes(_:length:)`](/documentation/Foundation/NSData/getBytes(_:length:))

Copies a number of bytes from the start of the data object into a given buffer.



---

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)