Power BI Theme Validator
Check a theme JSON file for syntax errors, invalid colours and low contrast before you import it.
Results
Paste a theme and click Check theme. Nothing leaves your browser.
What this checks
The check has two separate parts, because a file can be valid JSON and still not be a good Power BI theme.
- JSON syntax. A missing comma, trailing comma, single quotes or an unclosed bracket stops the file from loading at all. Errors show the line and column.
- Theme structure. A name, a list of
#RRGGBBdata colours, valid colours in the root and invisualStyles, and well-formed text classes. Repeated colours and duplicate keys are flagged. - Contrast. Data colours and text colours are compared with the visual or page background using WCAG contrast ratios.
Power BI's theme format is large and changes between releases, so properties this tool does not know are reported as notes, never as errors. A clean result means no problems were found in what is checked here. Importing the file in Power BI Desktop (View, Themes, Browse for themes) is still the final test.
How to use this validator
- Paste your theme JSON into the box on the left, or upload the
.jsonfile. - Click Check theme.
- Fix errors first, then warnings. Notes are for information.
- Download the cleaned-up file, or open the colours in the Power BI Theme Generator to adjust them.
Frequently asked questions
Is my theme uploaded anywhere?
No. The file is read and checked locally in your browser. Nothing is sent to a server.
Does a clean result guarantee Power BI will accept the theme?
No. It means the checks here found nothing wrong. Power BI has many more theme properties than this tool checks, so import the file in Power BI Desktop to confirm.
Why are some properties listed as notes?
Power BI ignores properties it does not recognise, and new ones are added over time. A note usually points to a spelling mistake, but it is not necessarily a problem.
What do the contrast numbers mean?
They are WCAG contrast ratios between a colour and its background, from 1:1 (identical) to 21:1 (black on white). Text should be at least 4.5:1 and chart elements at least 3:1.
Does it change my file?
No. The checker only reads it. The download button gives you the same content, re-indented, with keys in their original order and numbers exactly as typed.
How large a file can it check?
Up to 5 MB. Real theme files are usually well under 100 KB.
Related tools and resources
Create a theme from scratch with the Power BI Theme Generator, start from one of the ready-made themes in the Power BI Theme Collection, or format any JSON with the JSON Formatter.