Skip to content
html2LVGL

HTML to LVGL converter · now in testing

Flexbox to Firmware, Simplified.

Design at web speed with HTML & CSS, then export native, production-ready LVGL C++ and MicroPython code for ESP32, STM32, and Arduino displays.

Design

Build the UI in HTML & CSS

Use the layout tools you already know — flexbox, grid, and familiar box-model styling — instead of hand-writing LVGL object trees.

Preview

See it on a real display size

Check the result against your target screen's resolution and DPI before you export anything.

Export

Get production-ready firmware code

Export to C/C++, MicroPython, or LVGL XML — ready to drop into an ESP32, STM32, or Arduino project.

From a web page to LVGL code

A small card, converted for a 320×240 display. The code on the right is the converter's actual C++ output for the title and button (an excerpt; the full file also sets up the container).

Input: card.html
<!doctype html>
<html>
<head>
<style>
  body { margin: 0; background: #0b1220; font-family: sans-serif; }
  .card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
          width: 240px; height: 180px; margin: 30px 40px; background: #fbfbf9; border-radius: 16px; }
  .title { font-size: 18px; color: #12181a; }
  .btn { padding: 8px 20px; background: #0e4429; color: #fbfbf9; border-radius: 8px; font-size: 14px; }
</style>
</head>
<body>
  <div class="card">
    <div class="title">Water level</div>
    <button class="btn">Refill</button>
  </div>
</body>
</html>
Output: ui_card.cpp (excerpt)
lv_obj_t * title = lv_label_create(card);
lv_label_set_text(title, "Water level");
lv_obj_set_style_text_font(title, &lv_font_montserrat_18, 0);
lv_obj_set_style_text_color(title, lv_color_hex(0x12181a), 0);

lv_obj_t * btn_2 = lv_button_create(card);
lv_obj_set_width(btn_2, 75);
lv_obj_set_height(btn_2, 36);
lv_obj_set_style_bg_color(btn_2, lv_color_hex(0x0e4429), 0);
lv_obj_set_style_border_width(btn_2, 2, 0);
lv_obj_set_style_border_color(btn_2, lv_color_hex(0x000000), 0);
lv_obj_set_style_radius(btn_2, 8, 0);
lv_obj_set_style_shadow_width(btn_2, 0, 0);
lv_obj_set_style_pad_all(btn_2, 0, 0);

lv_obj_t * btn = lv_label_create(btn_2);
lv_obj_set_align(btn, LV_ALIGN_CENTER);
lv_label_set_text(btn, "Refill");
lv_obj_set_style_text_font(btn, &lv_font_montserrat_14, 0);
lv_obj_set_style_text_color(btn, lv_color_hex(0xfbfbf9), 0);
lv_obj_set_style_text_align(btn, LV_TEXT_ALIGN_CENTER, 0);

LVGL 9.x

XML output targets the lv_xml runtime in LVGL 9.4. C and C++ output works with any LVGL 9.x project, and MicroPython output uses lv_binding_micropython.

Four output formats

C, C++, MicroPython, and LVGL XML from the same design. Pick the one your project builds with.

ESP32, STM32, Arduino

Any board that runs LVGL. You set the display resolution, and the layout is computed at exactly that size.

Frequently asked questions

Which LVGL versions does html2LVGL target?

LVGL XML output targets the lv_xml runtime in LVGL 9.4. The generated C and C++ call the standard LVGL API and work with any LVGL 9.x project. MicroPython output targets lv_binding_micropython.

Which output formats can I export?

C, C++, MicroPython, and LVGL XML, all generated from the same design. The Free tier exports C and C++; MicroPython and XML need credits.

Which HTML and CSS features are supported?

Flexbox and grid layout, absolute positioning, colors, borders, radii, padding, opacity, two-stop linear gradients, box shadows, :hover and :active styles, buttons, text, images, range, checkbox and text inputs, selects, progress bars, and tables. CSS transforms such as rotation, and svg, canvas, video and iframe elements, are not converted yet. See the Features page for the full list.

Can I convert a React component?

Yes. Upload a .jsx or .tsx file with a default-exported component and each function component becomes a reusable LVGL component. Plain HTML works too.

Which displays and boards does it support?

Any board that runs LVGL 9.x, including ESP32, STM32, and Arduino projects. You choose the display resolution when you convert, and the layout is computed at that size.

Is html2LVGL free?

The Free tier needs no card: up to 20 HTML elements per conversion and 5 conversions per day, with C and C++ output. Credits unlock larger designs and more features. html2LVGL is currently in testing, so limits and pricing may change at launch.

Waitlist

Get 20 bonus credits when we launch

Join the waitlist for early access and we'll add bonus credits to your account the moment you sign up.