HTML to JSX
Convert HTML snippets into React JSX with camelCase attributes.
The HTML to JSX converter turns common HTML snippets into React JSX. It renames class and for, camelCases dashed attributes, keeps data and aria attributes, and converts style strings into JSX style objects.
Please enter some input.
How to use
- Paste an HTML snippet into the input field.
- Review the generated JSX output.
- Copy the JSX into your React component.
Frequently asked questions
Does it support self-closing tags?
Yes, void tags such as img, input and br are converted to self-closing JSX tags.
How are style attributes handled?
Simple style declarations are converted to JSX style objects with camelCase keys.
Related tools
JSON Formatter
Format, validate and minify JSON in one place.
XML Formatter
Pretty-print and indent XML documents.
YAML Formatter
Format YAML and convert between YAML and JSON in both directions.
CSV to JSON
Convert CSV tables into JSON data.
JWT
Encode, decode and verify JSON Web Tokens locally.
Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes.