Free Online HTML to JSX Converter
The HTML to JSX Converter rewrites plain HTML into valid React JSX. It renames attributes (class becomes className, for becomes htmlFor), self-closes void elements, converts inline style strings into style objects, and fixes a few other HTML-only quirks.
How to Use
Paste your HTML on the left and click Convert. The JSX output appears on the right, ready to drop into a React component.
- class becomes className, for becomes htmlFor
- Void elements become self-closing
- Inline style strings become style objects
- Converts HTML attributes to their JSX equivalents
- Runs entirely in your browser
Why convert HTML to JSX?
JSX looks like HTML but is stricter. React rejects reserved words like class and for, requires camelCase for most attributes, and needs self-closing void tags. This tool handles those differences automatically so you can paste existing markup straight into a component.
Related Developer Tools
You might also need
Tools from other categories that people pair with the HTML to JSX: