Skip to content

HTML to JSX Converter

Convert HTML to React JSX: class to className, inline styles to objects, self-closing void tags and JSX comments.

Runs in your browserHTML → JSX
Loading tool…

Example

Input
<div class="card" style="margin-top: 4px; font-size: 12px">
  <label for="email">Email</label>
  <input id="email" disabled>
  <!-- note -->
</div>
Output
<div className="card" style={{ marginTop: '4px', fontSize: '12px' }}>
  <label htmlFor="email">Email</label>
  <input id="email" disabled />
  {/* note */}
</div>

How to use the HTML to JSX Converter

  1. Paste or type your HTML into the input area, or open a file from your device.
  2. Adjust the options above the editor if the tool offers any.
  3. Review the JSX result, then copy it or download it as a file.

Privacy and limitations

  • Your data is processed on your device and is not uploaded to any server.
  • Inline event handlers (onclick="...") are wrapped in arrow functions as-is; review them before use.

Browse all html converters →