Skip to content

HTML to JSX Converter

Convert HTML to JSX online. Transform class to className, style strings to objects, and fix self-closing tags for React components.

About HTML to JSX Converter

When migrating HTML templates to React, you need to transform attributes and syntax to be JSX-compatible. This tool automates the tedious parts: converting class to className, for to htmlFor, inline style strings to style objects with camelCase properties, and self-closing void elements like img, br, and hr.

It also handles event handlers (onclick to onClick), boolean attributes, HTML comments to JSX comments, and SVG-specific attributes. Conversion happens in real-time as you type, entirely in your browser. Your HTML never leaves your device.