Back to Tools
CSS to JSON Converter
CSS to JSON
Convert CSS selectors and properties into structured JSON
Data Architect
JSON Representation
About the CSS to JSON Converter
Convert CSS rules into a JSON object.
How to use the CSS to JSON Converter
- Paste your code into the input box, or click Load Example to load an example.
- Press Convert to JSON Object.
- Use Copy (or Download where shown) to keep the result. Clear empties the box.
Worked example
.btn { color: red; } becomes {".btn": {"color": "red"}}.
Tips
- Handy for using CSS in JavaScript styling libraries.
Frequently Asked Questions
CSS-in-JS libraries and tools that read styles as data.