<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/PropertyListEncoder",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation19PropertyListEncoderC"
  },
  "title" : "PropertyListEncoder"
}
-->

# PropertyListEncoder

An object that encodes instances of data types to a property list.

```
class PropertyListEncoder
```

## Topics

### Encoding

[`init()`](/documentation/Foundation/PropertyListEncoder/init())

Creates a new, reusable property list encoder with the default formatting settings.

[`encode(_:)`](/documentation/Foundation/PropertyListEncoder/encode(_:))

Returns a property list that represents an encoded version of the value you supply.

[`encode(_:configuration:)`](/documentation/Foundation/PropertyListEncoder/encode(_:configuration:)-4biuh)

[`encode(_:configuration:)`](/documentation/Foundation/PropertyListEncoder/encode(_:configuration:)-5ee8q)

### Customizing Encoding

[`outputFormat`](/documentation/Foundation/PropertyListEncoder/outputFormat)

A value that determines which property list format is used during encoding.

[`userInfo`](/documentation/Foundation/PropertyListEncoder/userInfo)

A dictionary you use to customize the encoding process by providing contextual information.

## Relationships

### Conforms To

[`NetworkEncoder`](/documentation/Network/NetworkEncoder)

[`TopLevelEncoder`](/documentation/Combine/TopLevelEncoder)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`Copyable`](/documentation/Swift/Copyable)

---

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)