Browse all topics
SharePoint & OneDrive

SharePoint list and column formatting (JSON)

How JSON-based formatting customises SharePoint list views without code — what's possible and where to start.

SharePoint lists support JSON-based column and view formatting that customises how data displays without any custom code. It's one of the highest-leverage features in modern SharePoint — give users dramatically better-looking lists with a few lines of JSON.

What you can format

  • Column formatting — control the rendering of a specific column's values. Add icons, conditional colours, progress bars, action buttons, embedded links, formatted dates.
  • View formatting — control the rendering of an entire row or tile in a list view. Headers, footers, group headers can be styled.
  • Tile views — custom card-based layouts for galleries.

The same engine works in Microsoft Lists, SharePoint document libraries, and list views embedded in Teams tabs.

How it works

You write a JSON object that describes the rendering. The JSON references the field's value via @currentField, the row's other columns via [$ColumnName], the current user via @me, and various contextual values. Conditional logic uses =if(...) expressions or the newer Excel-style =switch() and other helpers.

A simple example — colour-code a Status column:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "background-color": "=if(@currentField == 'Done', '#dff6dd', if(@currentField == 'In Progress', '#fff4ce', '#fde7e9'))",
    "padding": "4px 8px",
    "border-radius": "4px"
  },
  "txtContent": "@currentField"
}

This turns a plain-text "Done / In Progress / Blocked" column into a coloured badge.

Common patterns

  • Icons next to text — a small icon plus the value to draw the eye.
  • Progress bars — for percent-complete columns.
  • Conditional colours — red / yellow / green by status or due date.
  • Person avatars and details — for person-or-group columns.
  • Action buttons — clicking opens a Power Apps form, runs a Power Automate flow, or opens a link.
  • Multi-line layouts — combine multiple columns into a single card.

Getting started

The fastest path:

  1. Browse the Microsoft 365 PnP Column-Formatting Samples repository on GitHub — hundreds of ready-to-use formatters.
  2. Copy a sample close to what you want.
  3. Adapt the column names and conditions.
  4. Apply via Column settings → Format this column → Advanced mode.

You don't need to write JSON from scratch unless you're doing something specific. Sample libraries cover the common cases.

When not to use formatting

  • Complex business logic belongs in a Power App, not a list formatter.
  • Cross-list relationships — formatting can only see the current row's data.
  • Performance-critical scenarios with huge lists — heavy formatting can slow rendering.

For administrators and citizen developers, list formatting is the closest thing to "customise SharePoint without code" that produces good-looking results. Invest a few hours in it; the payoff is dozens of polished lists across the tenant.