Skip to content

CSS to JS Object Converter

Convert CSS declarations or rules into camelCase JavaScript style objects for React, CSS-in-JS or JSON.

Runs in your browserCSS → JavaScript
Loading tool…

Example

Input
background-color: #fff;
-webkit-transition: all .2s;
z-index: 10;
Output
{
  backgroundColor: '#fff',
  WebkitTransition: 'all .2s',
  zIndex: 10,
}

How to use the CSS to JS Object Converter

  1. Paste or type your CSS into the input area, or open a file from your device.
  2. Adjust the options above the editor if the tool offers any.
  3. Review the JavaScript result, then copy it or download it as a file.

Privacy and limitations

  • Your data is processed on your device and is not uploaded to any server.

Browse all css tools →