CSS to JS Style Object
Convert CSS declarations into a JavaScript style object, JSX style attribute or JSON locally.
css-to-js-objectLOCAL WORKSPACE
Enabling local controls…
If clipboard access is denied, select the read-only output manually. Input HTML, SVG, CSS and JavaScript are never rendered or executed.
How to use this tool
Paste one declaration list without its selector. Choose an output format and convert it. CSS values keep their units and remain strings.
When not to use it
Repeated declarations and !important stay in a stylesheet. The converter produces text and does not test browser support for CSS values.
Read the guide →