<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCell/formatter",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCell(py)formatter"
  },
  "title" : "formatter"
}
-->

# formatter

The cell’s formatter object.

```
var formatter: Formatter? { get set }
```

## Discussion

A formatter handles the translation of the receiver’s contents between its onscreen representation and its object value. Cells use a formatter object to format the textual representation of their object value and to validate cell input and convert that input to an object value. When assigning a new formatter to a cell, the formatter attempts to interpret the cell’s current value. If it cannot do so, the formatter converts the current value to a string object.

---

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)