<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioConverter/init(from:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioConverter(im)initFromFormat:toFormat:"
  },
  "title" : "init(from:to:)"
}
-->

# init(from:to:)

Creates an audio converter object from the specified input and output formats.

```
init?(from fromFormat: AVAudioFormat, to toFormat: AVAudioFormat)
```

## Parameters

`fromFormat`

The input audio format.

`toFormat`

The audio format to convert to.

## Return Value

An [`AVAudioConverter`](/documentation/AVFAudio/AVAudioConverter) instance, or `nil` if the format conversion isn’t possible.

## Discussion

---

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)