Search and jump to any tool. Type to filter; use arrow keys to move and Enter to select.
Converts an HTML snippet into JSX that can be pasted into a React component.
Converts an HTML snippet into JSX that can be pasted into a React component. It renames the attributes React spells differently, turns inline style strings into objects, rewrites comments and closes void elements. The input is handled as text and turned into code, so it is never rendered on the page.
class="lbl" for="email" style="margin-top: 8px; background-color: #eee"
className="lbl" htmlFor="email" style={{ marginTop: "8px", backgroundColor: "#eee" }}Good to know. Numeric-looking values such as tabindex="2" stay string attributes, giving tabIndex="2". React accepts that, but TypeScript expects a number, so change it to tabIndex={2} if the compiler objects. Literal curly braces in text are wrapped as string expressions.
classclassNameforhtmlFortabindextabIndexstroke-widthstrokeWidthstyle="…"style={{ … }}<!-- … -->{/* … */}<br><br />onclickonClick