<!--
{
  "availability" : [
    "iOS: 26.2.0 -",
    "iPadOS: 26.2.0 -",
    "macCatalyst: 26.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WiFiInfrastructure",
  "identifier" : "/documentation/WiFiInfrastructure/WISSID/stringRepresentation(encoding:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Wi-Fi Infrastructure"
    ],
    "preciseIdentifier" : "s:18WiFiInfrastructure6WISSIDV20stringRepresentation8encodingSSSgSS10FoundationE8EncodingV_tF"
  },
  "title" : "stringRepresentation(encoding:)"
}
-->

# stringRepresentation(encoding:)

Converts the SSID’s raw data to a string representation using the specified encoding.

```
func stringRepresentation(encoding: String.Encoding = .utf8) -> String?
```

## Parameters

`encoding`

The text encoding to use for conversion. Defaults to UTF-8.

## Return Value

A string representation of the SSID, or `nil` if the raw data can’t be converted using the specified encoding.

## Discussion

Use this method to obtain a human-readable version of the network name. Because SSIDs don’t have a
standardized text encoding, the conversion may fail if the raw data can’t be represented as text
in the specified encoding.

> Warning: Per the Wi-Fi standard, the SSID is a value between 1 and 32 bytes long, and not a `String`.
> No standard encoding is defined, and any byte value may appear, including embedded NULL characters, control characters, and other unprintable values.

---

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)