Free HTML to JSX Converter
Convert HTML to valid JSX/React code. Transforms class to className, for to htmlFor, inline styles to objects, and self-closes void elements. No signup required.
100% free — no account needed
Free HTML to JSX Converter Features
Stop manually converting HTML for React
Style Objects
Converts inline style strings to JavaScript objects with camelCase properties.
Attribute Conversion
class→className, for→htmlFor, tabindex→tabIndex, and all event handlers.
Change Summary
See how many transformations were made with a per-rule breakdown.
Self-Closing Tags
Auto-closes void elements: , , , , etc.
FAQ
What gets converted?
class→className, for→htmlFor, tabindex→tabIndex, onclick→onClick, style strings→objects, self-closing tags, HTML comments→JSX comments, and more.
Does it handle complex HTML?
It handles most common patterns. Very complex HTML with embedded scripts or templates may need manual adjustments.
Can I use this for TSX?
Yes. JSX and TSX use the same syntax for HTML attributes. The output works in both .jsx and .tsx files.
More Dev Utilities
Regex tester, JSON formatter, CSS tools, and more.