← Back to Blog

SharePoint List Formatting: Complete JSON Guide with 15 Templates (2026)

Transform plain SharePoint lists into visual dashboards using JSON formatting — column formatting, view formatting, row formatting, and form customization with 15 ready-to-use templates.

SharePoint List Formatting: Complete JSON Guide with 15 Templates (2026)


Why JSON Formatting Changes Everything

SharePoint lists are the backbone of most Microsoft 365 solutions — project trackers, asset inventories, helpdesk tickets, HR onboarding checklists. But out of the box, they look like spreadsheets.

JSON formatting lets you transform any column, row, or entire view into a visual dashboard — without writing a single line of C#, deploying an SPFx web part, or touching the app catalog. You write JSON, paste it into SharePoint, and it works instantly for everyone who views that list.

What You Can Format

Formatting TypeWhat It DoesWhere to Apply
Column formattingCustomize how a single column rendersColumn settings → Format this column
View formattingCustomize the entire list view layoutView dropdown → Format current view
Row formattingApply styles to entire rows conditionallyView formatting with rowFormatter
Form customizationCustomize the new/edit form layoutList settings → Configure layout → Form

New in 2026: SharePoint now supports the v2 schema with Excel-style expressions, making formatting significantly easier to write and read.

---

Getting Started: How to Apply JSON Formatting

Column Formatting

  • Go to your SharePoint list

  • Click the column header → Column settingsFormat this column

  • Switch to Advanced mode

  • Paste your JSON

  • Click Preview to verify, then Save

View Formatting

  • Click the view dropdown (top right of the list)

  • Select Format current view

  • Switch to Advanced mode

  • Paste your JSON and save
Pro tip: Always include the $schema line at the top of your JSON. It enables IntelliSense in VS Code and validates your formatting before you paste it into SharePoint.

---

The JSON Formatting Structure

Every formatting JSON follows this pattern:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"padding": "8px",
"font-weight": "600"
},
"attributes": {
"class": "sp-css-color-GreenDark"
},
"txtContent": "@currentField",
"children": []
}
\
\\

PropertyPurposeExample
elmTypeHTML element typediv, span, a, img, button
txtContentText to display@currentField, [$Title]
styleCSS stylesbackground-color, padding, border-radius
attributesHTML attributes and CSS classesclass, href, title, iconName
childrenNested elementsArray of child elements

Key Variables

VariableReturnsExample Use
@currentFieldCurrent column valueStatus text, number, date
[$ColumnName]Any other column\’s value[$Priority], [$DueDate]
@meCurrent user\’s emailPersonalize per user
@nowCurrent date/timeCompare with due dates
[$Editor.title]Person field\’s display nameShow who last edited

---

Template 1: Status Badges with Icons

Turn a Choice column into colored pills with Fluent UI icons:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"display": "flex",
"align-items": "center",
"gap": "6px",
"padding": "4px 12px",
"border-radius": "16px",
"font-size": "13px",
"font-weight": "600",
"background-color": "=if(@currentField == 'Active', '#dff6dd', if(@currentField == 'Pending', '#fff4ce', '#fde7e9'))",
"color": "=if(@currentField == 'Active', '#107c10', if(@currentField == 'Pending', '#797600', '#a80000'))"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "=if(@currentField == 'Active', 'CompletedSolid', if(@currentField == 'Pending', 'Clock', 'ErrorBadge'))"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}
\
\\

---

Template 2: Progress Bar

Show a Number column (0–100) as a visual bar that changes color based on progress:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"width": "100%",
"height": "20px",
"background-color": "#f0f0f0",
"border-radius": "10px",
"overflow": "hidden",
"position": "relative"
},
"children": [
{
"elmType": "div",
"style": {
"width": "=toString(@currentField) + '%'",
"height": "100%",
"background-color": "=if(@currentField >= 80, '#0078d4', if(@currentField >= 50, '#ffaa44', '#d13438'))",
"border-radius": "10px",
"transition": "width 0.3s"
}
},
{
"elmType": "span",
"style": {
"position": "absolute",
"left": "50%",
"top": "50%",
"transform": "translate(-50%,-50%)",
"font-size": "11px",
"font-weight": "600",
"color": "#333"
},
"txtContent": "=toString(@currentField) + '%'"
}
]
}
\
\\

---

Template 3: Due Date with Overdue Highlight

Highlight a Date column red if overdue, yellow if due within 7 days, and green if future:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"display": "flex",
"align-items": "center",
"gap": "6px",
"padding": "4px 10px",
"border-radius": "4px",
"background-color": "=if(@currentField <= @now, '#fde7e9', if(@currentField <= @now + 604800000, '#fff4ce', '#dff6dd'))",
"color": "=if(@currentField <= @now, '#a80000', if(@currentField <= @now + 604800000, '#797600', '#107c10'))"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "=if(@currentField <= @now, 'Warning', 'Calendar')"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}
\
\\

Note: 604800000 is 7 days in milliseconds. Use this for date arithmetic with @now.

---

Template 4: Person Column with Profile Image

Display a Person column as an avatar with name instead of plain text:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"display": "flex",
"align-items": "center",
"gap": "8px"
},
"children": [
{
"elmType": "img",
"style": {
"width": "32px",
"height": "32px",
"border-radius": "50%",
"object-fit": "cover"
},
"attributes": {
"src": "='/_layouts/15/userphoto.aspx?size=S&accountname=' + @currentField.email"
}
},
{
"elmType": "span",
"style": { "font-weight": "600" },
"txtContent": "@currentField.title"
}
]
}
\
\\

---

Template 5: Priority Column with Color Dots

Show a priority level as a colored dot + text:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": { "display": "flex", "align-items": "center", "gap": "8px" },
"children": [
{
"elmType": "div",
"style": {
"width": "10px",
"height": "10px",
"border-radius": "50%",
"background-color": "=if(@currentField == 'Critical', '#d13438', if(@currentField == 'High', '#ffaa44', if(@currentField == 'Medium', '#0078d4', '#76b900')))"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}
\
\\

---

Template 6: Clickable URL Button

Convert a hyperlink column into a styled action button:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"style": {
"display": "inline-flex",
"align-items": "center",
"gap": "6px",
"padding": "6px 14px",
"border-radius": "4px",
"background-color": "#0078d4",
"color": "#ffffff",
"text-decoration": "none",
"font-size": "13px"
},
"attributes": {
"href": "@currentField",
"target": "_blank"
},
"children": [
{
"elmType": "span",
"attributes": { "iconName": "OpenInNewWindow" }
},
{
"elmType": "span",
"txtContent": "Open Link"
}
]
}
\
\\

---

Template 7: Yes/No Toggle with Icons

Replace the default checkbox with a visual indicator:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"display": "flex",
"align-items": "center",
"gap": "6px",
"color": "=if(@currentField == true, '#107c10', '#a80000')"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "=if(@currentField == true, 'CheckboxComposite', 'Checkbox')"
},
"style": { "font-size": "18px" }
},
{
"elmType": "span",
"txtContent": "=if(@currentField == true, 'Complete', 'Incomplete')"
}
]
}
\
\\

---

Template 8: Row Formatting — Highlight Overdue Items

Apply background color to entire rows using view formatting:

\\\json
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/view-formatting.schema.json",
"schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalRowClass": "=if([$DueDate] <= @now && [$Status] != 'Completed', 'sp-css-backgroundColor-errorBackground', if([$DueDate] <= @now + 604800000 && [$Status] != 'Completed', 'sp-css-backgroundColor-warningBackground', ''))"
}
\
\\

This highlights overdue rows in red and approaching-due rows in yellow, but leaves completed items unstyled.

---

Excel-Style Expressions vs AST Syntax

SharePoint supports two expression syntaxes. The v2 schema (2024+) supports Excel-style expressions, which are much easier to read:

SyntaxExampleReadability
Excel-style (recommended)=if(@currentField == 'Active', 'green', 'red')✅ Easy
AST (legacy){"operator": "?", "operands": [{"operator": "==", "operands": ["@currentField", "Active"]}, "green", "red"]}❌ Verbose

Always use Excel-style expressions unless you need to support SharePoint Server 2019, which only understands AST syntax.

Nesting If Statements

\\\
=if(@currentField == 'Critical', '#d13438',
if(@currentField == 'High', '#ffaa44',
if(@currentField == 'Medium', '#0078d4', '#76b900')))
\
\\

---

Fluent UI Classes and Icons

SharePoint provides predefined CSS classes and icons from Fluent UI. Using these classes ensures your formatting looks consistent with the rest of SharePoint.

Useful Predefined Classes

ClassEffect
sp-css-backgroundColor-successBackgroundGreen background
sp-css-backgroundColor-warningBackgroundYellow background
sp-css-backgroundColor-errorBackgroundRed background
sp-css-color-GreenDarkDark green text
sp-field-severity--warningWarning severity style
sp-field-severity--goodGood severity style

Popular Icon Names

IconiconName ValueUse Case
✅ CheckmarkCompletedSolidTask done
⚠️ WarningWarningOverdue item
⭐ StarFavoriteStarFeatured/important
📅 CalendarCalendarDate fields
👤 PersonContactPeople columns
📄 DocumentDocumentFile references

Browse all icons at Fluent UI Icons.

---

Form Customization with JSON

Customize the new/edit form layout by grouping fields into sections:

  • Open list settings → FormsConfigure layout

  • Select Header, Body, or Footer

  • Paste your JSON

Example: Form Header

\\\json
{
"elmType": "div",
"style": {
"display": "flex",
"align-items": "center",
"gap": "12px",
"padding": "12px",
"background-color": "#f3f2f1",
"border-bottom": "2px solid #0078d4"
},
"children": [
{
"elmType": "span",
"attributes": { "iconName": "TaskManager" },
"style": { "font-size": "24px", "color": "#0078d4" }
},
{
"elmType": "span",
"style": { "font-size": "18px", "font-weight": "600" },
"txtContent": "=if([$ID], 'Edit Task: ' + [$Title], 'New Task')"
}
]
}
\
\\

---

Debugging Tips

ProblemCauseFix
Formatting doesn\’t appearInvalid JSON syntaxValidate at jsonlint.com before pasting
Column shows raw JSON textMissing $schema or wrong schema URLUse the v2 column-formatting schema
Icons don\’t renderWrong iconName valueCheck the Fluent UI icon catalog
Colors look wrongUsing hex instead of theme classesUse sp-css- classes for theme-aware colors
Person field shows [object]Not accessing .title or .emailUse @currentField.title for display name

---

Frequently Asked Questions

Can I format any column type?
Almost. JSON formatting works with Text, Choice, Number, Date, Yes/No, Person, Hyperlink, Lookup, and Managed Metadata columns. It does NOT work with Calculated columns.

Does formatting change the actual data?
No. JSON formatting only changes how data displays. The underlying values remain unchanged. Other systems consuming the list data via REST or Graph API see the raw values.

Can different users see different formatting?
The formatting is applied to the view, so everyone who uses that view sees the same formatting. However, you can use @me in expressions to personalize the display per user (e.g., highlight items assigned to the current user).

Is there a character limit for the JSON?
Yes — the column formatting JSON limit is approximately 100 KB. For complex formatting, keep your JSON concise by using Excel-style expressions instead of AST.

Where can I find more templates?
Check Microsoft\’s official community repository: SharePoint List Formatting Samples — it contains 300+ community-contributed templates.

---

Your Next Steps

  • Start with Template 1 (Status Badges) — it works on any Choice column in 30 seconds

  • Combine templates — apply different formatting to each column for a dashboard effect

  • Use row formatting (Template 8) to highlight overdue or high-priority items across all columns

  • Explore form customization to give your new/edit forms a branded, professional look

For related guides: