HTML → JSX Converter
Convert HTML code to React JSX format.
HTML Input
Enter HTML code to convert
JSX Result
Converted JSX code
HTML → JSX Conversion Rules
Main Conversion Rules
- • class→className
- • for→htmlFor
- • style="color: red"→style={color: "red"}
- • 자체 닫힘 태그: <img>→<img />
- • 케밥 케이스 → 카멜 케이스: stroke-width→strokeWidth
Supported Attribute Conversions
- • HTML attributes: class, for, readonly, maxlength, autocomplete
- • SVG attributes: stroke-width, stroke-linecap, fill-opacity
- • Numeric attributes: Remove quotes and wrap in braces
- • Boolean attributes: aria-hidden="true" → aria-hidden=""
- • Preserved attributes: data-*, aria-* (keep kebab case)
Full HTML Document Support
- • DOCTYPE, html, head, body tag processing
- • meta, title, style tag conversion
- • Complete SVG element and attribute support
- • CSS style block preservation