TOOLDENDEVELOPERON-DEVICE
HTML to JSX Converter: React Ready
Convert HTML to JSX for React components. All processing happens in your browser, nothing is sent to a server.
HOW TO USE
- 1Paste your HTML in the input. JSX appears instantly in the output as you type.
- 2class becomes className, for becomes htmlFor and inline handlers become camelCase.
- 3Load the sample to see a typical conversion at work.
- 4Copy the output and paste it straight into your React component.
EXAMPLE
INPUT
<label for="email" class="field" onclick="focusEmail()">Email</label>
OUTPUT
<label htmlFor="email" className="field" onClick={focusEmail()}>Email</label>FAQ
Which attributes are converted?
Class to className, for to htmlFor, event handlers like onclick to onClick, style strings to objects, and other React specific names such as tabindex to tabIndex.
Does it convert as I type?
Yes, the JSX pane updates instantly with every keystroke. There is no convert button to press.
Is my HTML uploaded anywhere?
No. Conversion happens entirely in your browser.
Do comments survive the conversion?
Yes, HTML comments are kept and converted to JSX comment syntax.