<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFSwapInt16BigToHost(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFSwapInt16BigToHost"
  },
  "title" : "CFSwapInt16BigToHost(_:)"
}
-->

# CFSwapInt16BigToHost(_:)

Converts a 16-bit integer from big-endian format to the host’s native byte order.

```
func CFSwapInt16BigToHost(_ arg: UInt16) -> UInt16
```

## Parameters

`arg`

The integer whose bytes should be swapped.

## Return Value

The integer with its bytes swapped. If the host is big-endian, this function returns `arg` unchanged.

## 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)