HTML input
Paste HTML markup, then press Convert.
JSX output
Waiting for HTML input.
Convert HTML to React JSX for free. Paste markup and get valid JSX with className, htmlFor, camelCase props and style objects. Runs in your browser.
Paste HTML markup, then press Convert.
Waiting for HTML input.
JSX looks like HTML but follows JavaScript rules: class becomes className, for becomes htmlFor, inline styles become objects, and event props use camelCase like onClick. Comments and boolean attributes are rewritten too.
The tool also self-closes void elements (img, br, input) and escapes curly braces in text so your markup does not accidentally become expressions.
Pasted event handlers like onclick cannot be converted to real functions, so they become onClick placeholders you wire up yourself. Custom elements and web components pass through with their attributes camelCased.
Always give the output a quick read: complex nested templates sometimes need small manual fixes, especially around whitespace and conditional markup.