Convert HTML to React JSX online
Convert HTML into React JSX (class → className, camelCase attributes, style object, comments).
🔒 100% client-side — no data sent
Turn HTML into valid React JSX: class becomes className, attributes go camelCase, inline styles become objects and comments are converted. Local, in-browser conversion.
What is it for?
- ▸ Paste an HTML template into a React component
- ▸ Migrate a static page to JSX
- ▸ Fix incompatible attributes (class, for…)
- ▸ Convert an inline style to a React object
FAQ
Which attributes are renamed?
class → className, for → htmlFor, tabindex → tabIndex, and many other attributes are camelCased.
Are onclick handlers converted?
Not automatically: React expects onClick with a function. The tool warns you so you can adapt them manually.
Are inline styles handled?
Yes: the style="..." string is turned into a JavaScript object with camelCase properties.
Is the HTML sent anywhere?
No, parsing and conversion happen in your browser; nothing is transmitted.
Related tools
JSON · format / validate Format, indent, minify and validate JSON. 100% client-side. JSON · minify Minify JSON (strip whitespace and line breaks) to reduce its size. JSON → JSDoc Generate JSDoc typedefs (@typedef) from JSON, to document and type your JS code. JSON → TypeScript Generate a TypeScript interface from a JSON object, including nested types. JSON · validator Check whether your JSON is valid and pinpoint the first error precisely. Markdown → HTML Convert Markdown to HTML with a live preview, in your browser.