HTML to JSX Converter
Convert HTML to JSX — class to className, inline styles to objects, and self-closed tags.
JSX
Turning HTML into JSX
JSX looks like HTML but follows JavaScript's rules, so a handful of attributes have to change when you paste markup into a React component. This converter renames class to className and for to htmlFor, converts inline style strings into style objects with camelCased properties, turns HTML comments into {/* */} comments, and self-closes void elements like <br> and <img>. It covers the common cases — review the output for unusual markup.
Tidy the markup first with the HTML formatter, or go the other way and build types from data with JSON to TypeScript. All conversion runs locally in your browser.
Related Converters tools
JSON to YAML
Convert JSON into clean, readable YAML instantly.
YAML to JSON
Convert YAML configuration into valid JSON.
JSON to CSV
Flatten a JSON array of objects into CSV rows.
CSV to JSON
Parse CSV with headers into a JSON array of objects.
JSON to XML
Convert JSON structures into nested XML markup.
JSON Minifier
Strip whitespace to produce compact JSON.
JSON to TypeScript
Generate TypeScript interfaces from a JSON sample.
JSON to SQL
Turn a JSON array of objects into SQL INSERT statements.