---
title: "Encoding, Decoding, and Serialization"
framework: swift
role: collectionGroup
role_heading: API Collection
path: swift/encoding-decoding-and-serialization
---

# Encoding, Decoding, and Serialization

Serialize and deserialize instances of your types with implicit or customized encoding.

## Topics

### Custom Encoding and Decoding

- [Encoding and Decoding Custom Types](foundation/encoding-and-decoding-custom-types.md)
- [Codable](swift/codable.md)
- [Encodable](swift/encodable.md)
- [Decodable](swift/decodable.md)
- [CodingKey](swift/codingkey.md)
- [CodingKeyRepresentable](swift/codingkeyrepresentable.md)
- [CodingUserInfoKey](swift/codinguserinfokey.md)

### Encoders and Decoders

- [Encoder](swift/encoder.md)
- [Decoder](swift/decoder.md)
- [EncodingError](swift/encodingerror.md)
- [DecodingError](swift/decodingerror.md)

### Encoding Containers

- [SingleValueEncodingContainer](swift/singlevalueencodingcontainer.md)
- [KeyedEncodingContainer](swift/keyedencodingcontainer.md)
- [KeyedEncodingContainerProtocol](swift/keyedencodingcontainerprotocol.md)
- [UnkeyedEncodingContainer](swift/unkeyedencodingcontainer.md)

### Decoding Containers

- [KeyedDecodingContainer](swift/keyeddecodingcontainer.md)
- [SingleValueDecodingContainer](swift/singlevaluedecodingcontainer.md)
- [KeyedDecodingContainerProtocol](swift/keyeddecodingcontainerprotocol.md)
- [UnkeyedDecodingContainer](swift/unkeyeddecodingcontainer.md)

## See Also

### Tools for Your Types

- [Basic Behaviors](swift/basic-behaviors.md)
- [Initialization with Literals](swift/initialization-with-literals.md)
