A Progressive Web App (PWA) for controlling CNC or laser machines from the browser using the Web Serial API.
It allows users to draw, process images, generate G-code, and communicate with controllers – directly in Google Chrome, with full offline support.
HobbyLASER is aimed at users of CNC machines, engravers, and plotters—particularly self-built or budget models. It was developed to fill the gap between the basic software offered by low-cost machine manufacturers and professional software solutions, with a focus on hobby use and rapid prototyping.
Simple but not trivial, it uses a hybrid system of tools and scripts to create and transform vector drawings, process images, and generate files ready to be sent to microcontrollers. HobbyLASER requires no installation, as it runs entirely in the browser—no dependencies, no drivers—using the Web Serial API for USB communication.
It should be considered a constant work in progress, but thanks to its nature as a Progressive Web App (PWA), updates are available immediately upon release. Currently, it can import text-based files with the following extensions: .svg, .dxf, .gcode, .nc, and raster images in .png, .jpg, or .jpeg format. The .svg format is an open standard, but only absolute commands are accepted. For example, when importing from Inkscape, make sure to convert objects to paths using absolute commands, adjust the document size, and set the scale to millimeters.
⚠ Optimized for Google Chrome in Dark Mode
Using a CNC or laser without proper training and protection can cause serious injury and blindness. We do not accept any liability for damages resulting from the use of this software.
🔗 [Read more about laser safety](https://www.lasersafetyfacts.com/laserclasses.html)
Try it now: https://marco-f.github.io/HL/
- Features
- SVG, G-code & Image Manipulation
- Web Serial API
- How to Run Locally
- Contributing
- Technologies Used
- Changelog
- Acknowledgments
- Documentation
- Interactive Drawing – Create vector designs directly in the browser. Supports polyline, primitives, boolean and transformation operations.
- Import – Support for SVG and DXF files.
- Advanced Text Paths – Generate text paths with proper handling of letter holes and micro-junctions.
- Image Manipulation – Resize, rotate, translate, adjust gamma, dithering, halftone, crop, and convert to vector.
- Customizable G-code Generation – Set laser power, speed, passes, air assist, and more.
- 3D Preview & Simulation – Real-time visualization of cutting paths.
- File & Cache Management – Save G-code files locally with IndexedDB.
- GRBL Control – Connect, send commands, stop, pause, resume, read status, handle errors, and estimate job time.
- Offline & PWA – Work offline and install the app like a native app.
- Dark Mode Ready – Optimized for low-light environments.
-
SVG & Vectors
- Create and edit polylines, rectangles, circles, and other primitives.
- Boolean operations (union, difference, intersection).
- Geometric transformations: scale, rotate, translate, mirror, offset.
-
Text
- Convert text to vector paths.
- Manage internal letter holes (e.g., "o", "a", "e").
-
Images
- Transform: resize, rotate, translate.
- Process: dithering, halftone, crop, vector conversion.
-
G-code
- Custom parameters: power, speed, passes, air assist ...
- Creation of micro joints, pattern fillings.
- Real-time 3D preview and simulation.
- File saving in local cache (IndexedDB).
-
GRBL Control
- Connection and command sending via Web Serial API.
- Stop, pause, resume functionality.
- Monitor machine status, error handling, and time estimation.
This app uses the Chrome Web Serial API to communicate with CNC/laser controllers via serial connection.
- Access to serial ports from the browser
- Configure baud rate, data bits, parity, stop bits
- Asynchronous read/write via Streams API
- Detects connect/disconnect events
- Requires user permission
- Works in Chromium-based browsers only
-
Clone the repository:
bash git clone https://github.com/marco-f/HL
-
Navigate to the project folder:
bash cd HL
-
Run a local web server (e.g., with http-server):
bash npm install -g http-server http-server
-
Open your browser:
-
(Optional) Install the app as a PWA via the browser install prompt.
- HTML/CSS/JS – Core structure, layout, and logic
- Service Workers – Enable offline functionality
- Web Manifest – Metadata for PWA installation
- Streams API – For async serial communication
- SVG & Canvas APIs – Drawing and image rendering
- Fork the repository
- Create a new branch: git checkout -b feature-name
- Commit your changes: git commit -am 'Add feature'
- Push your branch: git push origin feature-name
- Open a Pull Request
See the full Contributing Guide
v1.0.0
-
First stable release with support for:
- Serial connection via Web Serial API
- Offline support with Service Workers
- G-code generation from drawings and raster images
- No personal data is collected.
- All operations run locally in the browser.
- Serial connection requires explicit user consent.
This project is licensed under the GNU GPL v3.0 – see the LICENSE file for details.
Marco-F – Lead Developer GitHub
Thanks to the open-source community, browser engineers, and CNC enthusiasts.
- clipper.js – Polygon clipping and offsetting
- opentype.js – Font parsing and rendering
- fabric.js – Canvas library
- three.js – 3D rendering engine
- Ace Editor – Embedded code editor
- potrace.js – Bitmap tracing
Incomplete and under active reorganization. Wiki.
riscrivere in puro markdown aggiungendo le nuove funzionalità, accurato strumento di quotatura; ace editor tooltip per accedere alle principali funzionalità di disegno trasformazione, modifica e conversione in gcode; strumento di 'nesting' per ottimizzare consumo di materiali e tagli
English
Italiano