⚛ HTML to JSX Converter

Convert HTML to JSX/TSX for React. Runs entirely in your browser.

Last updated: November 8, 2026 · By the BoltQuickTools team

Paste HTML into a React component without the errors

HTML dropped into a React component breaks on class, unclosed <br> tags and string styles. When you are moving markup from a template or a design export into React, this page does the bulk of the renaming. It is a text transformation in the page, and the tool's code sends nothing anywhere.

Running a conversion

  1. Paste into Input HTML. JSX Output updates shortly after you type or paste, or press Convert.
  2. Untick Preserve comments to delete comments rather than converting them.
  3. Copy Output copies the result, Sample HTML loads a longer example and Clear resets both boxes.

TypeScript mode only adds two comment lines to the top of the output. It does not add types or change the JSX, and you will need to delete those lines if you paste the result inside a component's return statement.

A form fragment, before and after

<label for="e" class="f">Email</label>
<input id="e" type="email" value="[email protected]" tabindex="1" readonly>
<br>
<!-- note -->
<td colspan="2" style="color: red; font-size: 14px; margin: 0">x</td>
<button disabled onclick="save()">Go</button>

becomes:

<label htmlFor="e" className="f">Email</label>
<input id="e" type="email" defaultValue="[email protected]" tabIndex="1" readOnly />
<br />
{/* note */}
<td colSpan="2" style={{color: 'red', fontSize: '14px', margin: 0}}>x</td>
<button disabled onClick={() => { save() }}>Go</button>

Handlers are wrapped as written in an arrow function. save still needs to exist in your component's scope.

What you still have to fix by hand

The page uses regular expressions and has no HTML parser, and the status message says success regardless. Read through the output, looking for these cases:

Reader questions

Why did value turn into defaultValue?

Mapping to defaultValue and defaultChecked creates an uncontrolled input that users can edit. For a controlled field, rename it to value and add an onChange handler.

Does the conversion count mean it found problems?

The "conversions" figure is a rough count of matching patterns in the input and is not a measure of correctness.

Can I tidy the markup first?

Formatting helps you review the result, so run it through the HTML beautifier first if it is minified. To audit which attributes a snippet uses before converting, try the HTML attribute extractor. For typing API data used by the component, the JSON to TypeScript converter helps.