Free CSS to JavaScript Converter
Convert CSS properties to JavaScript style objects. Transform kebab-case properties to camelCase. Perfect for React and styled-components.
Ad Space
Output Format:
Example:
background-color: #007bff;
padding: 10px 20px;
border-radius: 4px;
Converts to:
{ backgroundColor: '#007bff', padding: '10px 20px', borderRadius: '4px' }
Ad Space
How It Works
This tool parses CSS properties and converts them to JavaScript object syntax. Kebab-case property names (like background-color) are automatically converted to camelCase (backgroundColor). CSS values are preserved as-is. You can input individual properties or a complete CSS rule with selectors.
Property Conversion Examples
background-color → backgroundColor, border-radius → borderRadius, margin-top → marginTop