- Home
- Free tools
- HTML to JSX converter
HTML to JSX converter
Paste HTML and get JSX you can drop into a React component. Attributes are renamed, inline styles become objects and void tags close themselves.
JSX
Copy from live websites instead
PickCode turns any element on any page into Tailwind, React, Blade or HTML + CSS in one click. 5 free elements a day.
What the converter does
- React attribute names
classbecomesclassName,forbecomeshtmlFor, andtabindex,colspanorsrcsetget their camelCase names.- Style objects
- Inline
stylestrings become objects with camelCase properties. CSS variables stay as quoted keys. - Valid tags
- Void tags like
<img>and<br>close themselves, comments become JSX comments and several top-level elements get a fragment. - SVG and forms
- SVG attributes like
stroke-widthbecomestrokeWidth. FormvalueandcheckedbecomedefaultValueanddefaultChecked.
Inline event handlers like onclick are removed, because React expects functions. Add your own handlers after pasting.