<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/byte-order-constants",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Byte Order"
}
-->

# Byte Order

Recognize constants that specify a byte-order format.

## Discussion

These constants are returned by [`NSHostByteOrder()`](/documentation/Foundation/NSHostByteOrder()).

## Topics

### Constants

[`var NS_BigEndian: Int`](/documentation/Foundation/NS_BigEndian)

The byte order is big endian.

[`var NS_LittleEndian: Int`](/documentation/Foundation/NS_LittleEndian)

The byte order is little endian.

[`var NS_UnknownByteOrder: Int`](/documentation/Foundation/NS_UnknownByteOrder)

The byte order is unknown.



---

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)