Toolora

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.

How to use

  1. Paste an HTML snippet into the input field.
  2. Review the generated JSX output.
  3. 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.