# node-html-to-jsx

> The HTML to JSX Converter is a Node.js module that seamlessly transforms HTML markup into JSX syntax, ideal for your React projects.

Latest version **1.4.4** (published 2026-01-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-html-to-jsx
pnpm add node-html-to-jsx
yarn add node-html-to-jsx
bun add node-html-to-jsx
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.4.4 |
| Published | 2026-01-18 |
| First published | 2024-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 129.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Diogo Angelim |
| Maintainers | digelo |
| Keywords | frontend, html, jsx, react, convert |

## Links

- npm: https://www.npmjs.com/package/node-html-to-jsx
- Repository: https://github.com/DiogoAngelim/html-to-jsx
- Homepage: https://github.com/DiogoAngelim/html-to-jsx#readme
- Issues: https://github.com/DiogoAngelim/html-to-jsx/issues
- Funding: https://www.paypal.com/donate/?hosted_button_id=XA5LN4XR39PMQ
- npm.io page: https://npm.io/package/node-html-to-jsx

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.4.4 (latest) — 2026-01-18
- 1.4.2 — 2026-01-15
- 1.4.1 — 2026-01-12
- 1.4.0 — 2026-01-12
- 1.3.7 — 2025-11-06
- 1.3.6 — 2025-11-06
- 1.3.4 — 2025-11-06
- 1.3.3 — 2025-11-06
- 1.3.2 — 2025-06-09
- 1.3.1 — 2024-11-01
- 1.3.0 — 2024-11-01
- 1.2.9 — 2024-10-23
- 1.2.8 — 2024-10-23
- 1.2.7 — 2024-10-20
- 1.2.6 — 2024-10-19
- … 19 more at https://npm.io/package/node-html-to-jsx/versions

## README

### Overview
<!-- Badges -->
![Build Status](https://github.com/DiogoAngelim/html-to-jsx/actions/workflows/publish.yml/badge.svg?t=1)
 [![Coverage Status](https://coveralls.io/repos/github/DiogoAngelim/html-to-jsx/badge.svg?branch=main)](https://coveralls.io/github/DiogoAngelim/html-to-jsx?branch=main)
![License](https://img.shields.io/github/license/DiogoAngelim/html-to-jsx?style=flat)

This HTML to JSX Library provides functions to manipulate and transform HTML strings in JavaScript. It has utilities to wrap HTML content, close self-closing tags, convert event attributes to camel case, convert class attributes to className, remove HTML comments, indent HTML code, convert inline styles to objects, and validate HTML structure.

### Contributors

- [Mateus Nava](https://github.com/mateusnava)

### Installation

To use the HTML Converter Library in your project, you can install it via npm:

`npm install node-html-to-jsx`

### Usage

Import the library into your JavaScript file:

```JavaScript
import convert from 'node-html-to-jsx';
```

Then, you can use the convert function to transform your HTML code:

```JavaScript
const convertedHTML = convert('<div><p class="paragraph">Hello, world!</p></div>');
```

### Demo

See [DEMO](https://diogoangelim.github.io/html-to-jsx-demo/)

### Note

This library is primarily designed for manipulating HTML strings in JavaScript environments, particularly for use with frameworks like React.

### Contributing

We welcome contributions! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines and instructions on how to get started.

### License

This library is open-source and available under the MIT License.

---
_Source: https://npm.io/package/node-html-to-jsx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
