Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3    Statistic    FMM    Blog  


Formats a JSON string with color.

Component Version macOS Windows Linux Server iOS SDK License
JSON 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes Paid
MBS( "JSON.Colorize"; json { ; DarkMode } )   More

(old name: JSON.Colourise)


Parameter Description Example Flags
json A JSON text. {"key":"value"}
DarkMode Available in MBS FileMaker Plugin 12.1 or newer.
Whether to swap colors to use white for text color.
Pass 1 for dark mode and 0 for light mode.
Default is 0 for light mode.
0 Optional


Returns formatted text or error.


Formats a JSON string with color.
This colorizes an existing JSON text to show to user.
Keys get blue, text value purple, numbers and others orange and brackets black.

Text is returned only with colors. You can apply text font and font size with normal FileMaker functions.
Processing time is linear to length, so should be faster than custom functions.


Colorize a field:

Set Field [ Data::JSON ; MBS("JSON.Colorize"; Data::JSON) ]

See also

Release notes

  • Version 12.3
    • You can now use english spelling JSON.Colourise and XML.Colourise if you prefer to call JSON.Colorize or XML.Colorize.
  • Version 12.1
  • Version 11.5
    • Fixed a problem in JSON.Colorize function with coloring arrays.
  • Version 8.2

Example Databases

Blog Entries


Created 6th April 2018, last changed 31st May 2022

JSON.Clone - JSON.Compact

Feedback: Report problem or ask question.

Start Chat