HTML to JSX Converter
Your code never leaves your browser — everything runs on your device.
Paste HTML and get React JSX back: class becomes className, for becomes htmlFor, inline style strings become style objects with camelCase properties, void elements like img and input self-close, and SVG attributes are camelCased (viewBox, strokeWidth, fillRule). Optionally wrap the result in an exported component, as JSX or TSX. Free, no signup, and your code never leaves your browser.
Frequently asked questions
What changes when HTML becomes JSX?
class becomes className, for becomes htmlFor, tabindex becomes tabIndex, and other HTML attributes are camelCased. Inline styles like style="color: red" become style={{ color: "red" }}. Void elements self-close, and HTML comments become {/* ... */}.
How are SVG attributes handled?
SVG attributes are camelCased to their React names: viewbox becomes viewBox, stroke-width becomes strokeWidth, fill-rule becomes fillRule, and clip-path becomes clipPath.
What does the TSX option do?
TSX mode downloads the result as a .tsx file and types the component function with a JSX.Element return type. JSX mode downloads a plain .jsx file with no type annotations.
Is my HTML uploaded anywhere?
No. The conversion runs entirely in your browser with a small built-in parser. Your code is never sent to a server, stored, or shared.