DevBolt
Processed in your browser. Your data never leaves your device.

HTML to JSX Converter

Convert HTML to valid JSX — transforms attributes, inline styles, comments, void elements, event handlers, and SVG attributes.

Examples

HTML Input

JSX Output

<div className="container">
  <h1 className="title">Hello World</h1>
  <p className="text-gray-500">Welcome to my app.</p>
</div>

Changes Made

classclassName×3

HTML → JSX Quick Reference

HTMLJSXWhy
class="..."className="...""class" is a reserved word in JavaScript
for="..."htmlFor="...""for" is a reserved word in JavaScript
style="color: red"style={{ color: 'red' }}JSX styles are objects, not strings
<!-- comment -->{/* comment */}JSX uses JS comment syntax
<br><br />JSX requires self-closing void tags
<img ...><img ... />All void elements must self-close
tabindex="0"tabIndex="0"JSX uses camelCase attributes
onclick="..."onClick={() => {}}Event handlers are camelCase functions
colspan="2"colSpan="2"Multi-word attributes are camelCase
stroke-width="2"strokeWidth="2"SVG attributes use camelCase in JSX

Related Convert Tools