You probably do not need Electron to ship your HTML app as a desktop program
I build small desktop tools, and most of them start life as an HTML page. For years the default answer to "how do I turn this into a real app?" has been Electron. It works. It also ships a full copy of Chromium and Node.
I build small desktop tools, and most of them start life as an HTML page. For years the default answer to "how do I turn this into a real app?" has been Electron. It works. It also ships a full copy of Chromium and Node.js with every app, which is why a to-do list can weigh more than 100 MB.
For a lot of tools you do not need that. Here is the approach I use instead, what it costs you, and the two tools I built around it.
The idea: use the browser engine the OS already has
- On Windows 10 and 11 that engine is WebView2, the same engine as Edge.
- On Linux it is WebKitGTK, running inside a GTK3 window.
Your app becomes a small native window that loads your HTML, CSS and JavaScript. No bundled browser, no Node runtime. Tauri and Neutralino are built on the same idea.
What you gain
- Size. My builds come out at 8 to 15 MB on Windows and around 10 MB on Linux. A typical Electron app is 100 MB or more.
- Startup. There is no bundled browser to load, so the window opens quickly.
- Less to maintain. You are not shipping your own copy of Chromium, so you are not the one who has to keep it patched.
What you give up
Be honest with yourself about these before you switch.
- No Node.js APIs. If your app needs the file system through Node, child processes or native modules, stay with Electron or look at Tauri.
- Two engines. WebView2 is Chromium, WebKitGTK is WebKit. Test on both, the same way you would test Chrome and Safari.
- A runtime dependency. WebView2 has to be present on Windows, and GTK3 with WebKit2GTK on Linux.
When this fits
- Internal dashboards that should run without a server
- Offline calculators, trackers and small productivity apps
- Game jam utilities and level editors
- HTML5 games you want to hand to players as a download
- Client deliverables that should feel like software, not "just open this link"
If your project is plain HTML, CSS and JS that already works offline in a browser tab, it is a good candidate.
The tools I built for this
I got tired of wiring this up by hand for every project, so I turned it into two tools.
HTML2Win Pro (Windows 10 and 11). Point it at a local folder or a live URL, set the window size and the icon, and build. You get a single .exe.
- Step by step wizard with a live preview
- Custom icon, or drop in your own .ico
- A config file next to the exe for title, size, resizable and fullscreen
- CLI mode for batch or automated builds
- Security controls: CSP, sandboxing, external link handling
https://id01t.itch.io/html2win
HTML2Linux Pro. Same idea on native GTK3 and WebKit2GTK.
- Generates the .desktop file and installs icons, following XDG conventions
- Output as a standalone binary, AppImage, ZIP or TAR.GZ
- Detects the distro and its package manager (Ubuntu, Debian, Fedora, Arch, openSUSE and others)
- GUI and CLI, so it can run in CI
https://id01t.itch.io/html2linux-pro
Both are paid tools: one purchase, no subscription. If all you need is to turn a Python script into a Windows .exe, Py2Win is free: https://id01t.itch.io/py2win
One practical tip
Whatever tool you use on Windows, give it an .ico file that contains 16, 32, 48 and 256 pixel sizes. A single size is the usual reason a taskbar icon looks blurry.
A quick way to decide
- Do you need Node APIs or native modules? Use Electron or Tauri.
- Is it HTML, CSS and JS that already runs offline in a tab? A system webview wrapper is enough.
- Do you ship to Linux? Test in WebKit before you promise anything.
What are you shipping desktop apps with right now? If you have moved from Electron to Tauri or Neutralino, I would like to hear how it went.
Disclosure: I make and sell HTML2Win Pro and HTML2Linux Pro. This post was written by an AI assistant working on my behalf.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes â full credit and traffic to the original publisher.