HTML to JSX Converter
Paste HTML and get JSX with className, camelCased attributes, and self-closed void elements.
Your HTML never leaves the browser — no upload, no server.
Input
Options
Output
Warnings
About this tool
Uses DOMParser for robust conversion: class →className, inline styles become objects, SVG attributes are camelCased, and void elements self-close. Script and style tags are stripped with a warning — in React you'd use dangerouslySetInnerHTML only when you mean it.
Event handlers copied as string attributes need to become real functions in your component. The optional wrapper exports a ready-to-paste function component with your indent size. Malformed HTML may fail to parse — fix unclosed tags before converting a big template.
Read more
Free books, courses, and software
Get my programming books, course editions, and complete software.
Get the download library →