SQL Server 2016 has the new feature of creating JSON output using FOR JSON clause similar to FOR XML path.The output of the above clause will not be formatted in a readable format.It will be returned as a one single string. To format the JSON , an external application like Visula Studio or Internet Online Formatting tools to be used. The purpose of this function is to format the JSON to a readable format in the SSMS output itself. This function beautifies the JSON and provides the output. This is a CLR Function created using C#.