HTML to JSX Converter
Convert HTML to JSX for React. Transforms attributes, styles, comments, and self-closing tags.
<div className="container">
<label htmlFor="name">Name:</label>
<input type="text" id="name" className="form-control" readOnly tabIndex="1" autoFocus />
<img src="avatar.png" className="avatar" />
<br />
<hr />
<div style={{{ backgroundColor: '#f0f0f0', padding: 20, marginTop: 10 }}}>
<p className="text" contentEditable="true">Hello World</p>
<button className="btn" disabled onClick="handleClick()">Submit</button>
</div>
{/* This is a comment */}
<select className="select" multiple>
<option value="1" selected>One</option>
</select>
</div>Conversions Applied
class="..."→className="..."for="..."→htmlFor="..."style="color: red"→style={{ color: 'red' }}tabindex="1"→tabIndex="1"<!-- comment -->→{/* comment */}<img src="...">→<img src="..." /><br>→<br /><input ...>→<input ... />disabled="disabled"→disabledonclick="..."→onClick="..."readonly→readOnlycontenteditable→contentEditableFrequently Asked Questions
Related Tools
SVG to React Component
Convert SVG code to React JSX components. Auto-renames attributes (stroke-width to strokeWidth), converts inline styles, supports TypeScript, memo, and forwardRef.
JSON Formatter
Format, validate, and minify JSON data with syntax highlighting.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings back to plain text.
Regex Tester
Test and debug regular expressions in real-time. Matches highlighted, capture groups, replacements.
CSV to JSON Converter
Convert CSV data to JSON arrays and JSON arrays back to CSV. Custom delimiters supported.
Text Diff Checker
Compare two texts and see additions, removals, and unchanged lines highlighted side by side.