HTML to JSX Converter

Convert HTML into React JSX: className, htmlFor, style objects, self-closing tags and event handlers.

Runs instantly in your browser — results update as you type.

How do I convert HTML to JSX?

Paste the HTML and the converter parses it and rewrites it as JSX: class becomes className, for becomes htmlFor, inline style strings become style objects, void elements like img and input are self-closed, comments become {/* */} and onclick-style attributes become camelCase handler stubs.

How to use the HTML to JSX Converter

    Frequently asked questions

    Does it convert SVG?

    Yes, attributes like stroke-width become strokeWidth.

    Are event handlers converted?

    They become empty arrow-function stubs with the original code in a comment, to rewrite in React.

    Is it private?

    Yes, conversion runs in your browser.