Paste any HTML snippet and get React JSX output. Automatically converts attribute names, inline styles, self-closing tags, and SVG attributes.
JSX is the templating language used by React, Preact, and many other modern UI frameworks. While JSX looks like HTML, there are critical differences:
class becomes className, for becomes htmlFor, tabindex becomes tabIndex.style="color:red" becomes style={{color:'red'}}.<img src="x"> becomes <img src="x" />.stroke-width becomes strokeWidth, fill-opacity becomes fillOpacity.<!-- -->) become JSX comments ({/* */}).This converter handles all these transforms automatically so you can paste HTML directly from a design file or documentation and get production-ready JSX. Multiple root elements are automatically wrapped in a React Fragment <>...</>.
See also: Markdown Preview · cURL →Fetch · JSON →Code