HTML to JSX Converter

Convert HTML to JSX for React with automatic attribute transformations

Automatic Transformations
Attributes
  • class className
  • for htmlFor
  • tabindex tabIndex
  • readonly readOnly
  • maxlength maxLength
Event Handlers
  • onclick onClick
  • onchange onChange
  • onsubmit onSubmit
  • onfocus onFocus
  • onblur onBlur
Self-Closing Tags
  • <br> <br />
  • <hr> <hr />
  • <img> <img />
  • <input> <input />
  • <meta> <meta />
Style Attribute
  • style="..." style={{...}}
  • font-size fontSize
  • background-color backgroundColor
  • margin-top marginTop
  • text-align textAlign
SVG Attributes
  • fill-rule fillRule
  • stroke-width strokeWidth
  • clip-path clipPath
  • font-family fontFamily
  • xlink:href xlinkHref
Comments
  • <!-- ... --> {/* ... */}