Sharepoint Autofit column header of a list

New Contributor

I have created a list and some of the columns headers contain 3 or 4 words of text. These text headers shortened and dont display the full text. I have tried formatting the column width using JSON but that only applies to the column contents and not the header portion.


How do I auto fit the column headers?





   "$schema": "",
   "elmType": "div",
   "txtContent": "@currentField",
   "style": {
     "width": "500px"




1 Reply
best response confirmed by zapbrannigan (New Contributor)

@zapbrannigan This is a known limitation of JSON formatting. You cannot format only the column headers using JSON formatting in SharePoint online.


But you can manually increase the width of column header by dragging it to the right & save the list view.

For detailed steps, check: SharePoint Modern List - Increase column width with JSON Issue

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.