<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/ByteOrder",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s9ByteOrderO"
  },
  "title" : "ByteOrder"
}
-->

# ByteOrder

A byte ordering in memory.

```
@frozen enum ByteOrder
```

## Topics

### Operators

[`static func == (ByteOrder, ByteOrder) -> Bool`](/documentation/Swift/ByteOrder/==(_:_:))

Returns a Boolean value indicating whether two values are equal.

### Enumeration Cases

[`case bigEndian`](/documentation/Swift/ByteOrder/bigEndian)

Bytes are ordered with the most significant bits
starting at the lowest memory address.

[`case littleEndian`](/documentation/Swift/ByteOrder/littleEndian)

Bytes are ordered with the least significant bits
starting at the lowest memory address.

### Instance Properties

[`var hashValue: Int`](/documentation/Swift/ByteOrder/hashValue)

The hash value.

### Instance Methods

[`func hash(into: inout Hasher)`](/documentation/Swift/ByteOrder/hash(into:))

Hashes the essential components of this value by feeding them into the
given hasher.

### Type Properties

[`static var native: ByteOrder`](/documentation/Swift/ByteOrder/native)

The native byte ordering for the runtime target.

### Default Implementations

[Equatable Implementations](/documentation/Swift/ByteOrder/Equatable-Implementations)

## Relationships

### Conforms To

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

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

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

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

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

[`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)