JSON
Common Use Cases
- Column formatting: change colors, icons, or the layout of values displayed in a single column
- View formatting: control how list items, gallery cards, or full rows appear across an entire view
- Form customization: organize the New, Edit, and Display forms into sections with conditional logic and field grouping
- Conditional styling: highlight overdue tasks, priority items, or specific status values to draw user attention
- Site designs and site scripts: define reusable site provisioning templates that automate site creation and configuration
Benefits
- Low-code customization: format lists, libraries, and forms without writing C#, SPFx, or React
- Quick to implement: edits are made directly in the SharePoint browser interface and applied instantly
- Easy to share and reuse: JSON snippets can be copied between columns, views, and sites across the tenant
- Improves usability: visual cues such as colors and icons help users scan information faster
- Microsoft-supported: officially documented with a sample gallery, schema reference, and a built-in editor
- Lightweight: small text-based snippets that load quickly and add no significant overhead
How It Works
- A snippet describes the display: a formatting snippet is a JSON object that describes what to show (text, icons, colors, bars, links) and the rules for when to show it; SharePoint renders the result and the underlying data never changes
- Design mode first: common scenarios like conditional background colors and data bars need no code at all; JSON is only required in Advanced mode
- Excel-style expressions: conditional logic starts with an equals sign, such as =if([$Status] == ‘Done’, ‘green’, ‘red’)
- Portable snippets: formatting is plain text, so a working snippet pastes cleanly into another list or site and just works
- Ready-made samples: Microsoft maintains an open gallery of community samples you can paste in and adapt
- Instant results: formatting applies the moment you save, and the change is live for everyone
Limits and Nuances
- Syntax sensitivity: one missing comma or bracket breaks the whole snippet; the formatting simply stops rendering, so validate before saving
- Display only: formatting never changes the stored data, permissions, or any business logic
- Not a development platform: complex logic, multi-step processes, and integrations belong in Power Apps or Power Automate, not in formatting JSON
- No scripts or external calls: formatting is declarative by design, which is also why it is safe to allow broadly
- Modern Online only: Excel-style expressions (those starting with =) and formatting apply in modern SharePoint Online views; older views ignore formatting
- Unformattable columns: the file Name column in libraries, Retention Label, sealed columns, and multi-line text with enhanced rich text cannot be formatted
- Governance matters: because anyone who manages views can paste JSON, agree on a shared snippet library or every department invents its own look
- Some JSON literacy helps: Advanced mode rewards basic brackets-and-quoting skill, and the schema keeps evolving, so revisit snippets periodically as newer constructs simplify old workarounds
Common Questions About JSON in SharePoint
What is JSON formatting in SharePoint?
It is the built-in way to change how lists, libraries, and forms look by pasting a small snippet of structured text (JSON) into SharePoint’s formatting panel. The snippet describes colors, icons, layouts, and conditions – for example, show a red pill when Status equals Overdue. It changes presentation only: the data, permissions, and behavior of the list stay exactly the same.
Do I need to know how to code to use JSON formatting?
Not for the common scenarios. Design mode handles conditional background colors and data bars with simple menus – no JSON at all. Advanced mode, where you paste or edit JSON directly, rewards basic familiarity with brackets, commas, and quoting, but most people start from a ready-made sample and adjust a field name or a color rather than writing snippets from scratch.
What is the difference between column formatting and view formatting?
Column formatting styles the values of one column – a colored status pill, an icon next to a number, a clickable link. View formatting styles entire rows or replaces the whole layout, which is how lists become card galleries or get alternating row colors. They work together: a view format can set the overall stage while column formats handle individual fields.
Why did my JSON formatting stop working?
Nine times out of ten it is syntax: a missing comma, an unmatched bracket, or curly quotes pasted in from Word instead of straight quotes. When the JSON is invalid, SharePoint quietly falls back to the unformatted display. Re-open Advanced mode, look for the flagged error, and validate the snippet. Also check that a renamed column still matches the internal field name used in the JSON.
Where can I find ready-made JSON formatting examples?
Microsoft maintains an open community gallery of list formatting samples on GitHub, covering everything from progress bars to approval buttons, and the official documentation includes a full schema reference. Snippets are plain text, so they copy cleanly between tenants. Greg Zelfond often starts from a proven sample and tailors the colors and fields to match the client’s intranet design.
Can JSON formatting change or update my list data?
No – and that is a feature. Formatting is declarative: it reads values and decides how to display them, but it cannot write data, run scripts, or call external services. The notable exception is action buttons, which can launch built-in behaviors like opening a link, an email, or a Power Automate flow – the flow does the work, not the JSON. For anything that modifies data, use Power Apps or Power Automate.