CSS to JS Objects
Convert CSS to JavaScript style objects
CSS Input
Paste your CSS properties here (one per line)
JavaScript Output
Generated JavaScript style object
How to Use
1. Paste your CSS properties in the input area
2. Click "Convert to JS" to transform to JavaScript object
3. Copy the object and use it in your React/JS code
What it converts:
- background-color → backgroundColor
- font-size → fontSize
- margin-top → marginTop
- Converts all kebab-case to camelCase
- Wraps values in quotes (preserves numbers)
Usage example:
const styles = {...};
<div style={styles}>...</div>