Browser label designer for KNAON Y50P, NIIMBOT B1, Labeer Y43BT, Core Innovations CTP800BD and POLONO PM220S thermal printers that batch-prints CSV rows over Web Bluetooth.

Live: printrow.lastra.us
No drivers, no installs, no print server: design a label in the browser, bind {{variables}} to CSV columns, and batch-print to a KNAON Y50P, a NIIMBOT B1, a Labeer Y43BT, a Core Innovations CTP800BD or a POLONO PM220S thermal printer directly from the page.
Features
- Canvas editor: multi-select, marquee, align and distribute, groups, layer reordering by drag, free rotation, undo/redo, and middle-drag panning.
- Elements: text (9 bundled fonts), barcodes and QR (7 symbologies via bwip-js), images, boxes, and any of lucide's ~1,750 icons through a searchable picker.
- CSV binding:
{{column}}resolves straight to a CSV column; no mapping step. Per-column formatting for text, numbers, currency (8 codes), and dates (7 patterns), stored on the template so it survives re-importing next week's file. - Batch printing: print one row or all of them, with a progress bar, cancel, and, on printers that report status, a check between labels so a jam or open cover stops the run instead of spooling into the void.
Hardware
All five printers below have printed real labels over Web Bluetooth.
KNAON Y50P
Verified at 50 × 30 mm stock, 8 dots/mm. Other media heights are safe, because the protocol never transmits height: the printer simply takes rows until the raster ends. Widths other than 50 mm follow the captured frame format but have not been tested on real stock.
This hardware is white-labeled, so the printer on your desk may carry a different name. The KNAON unit here and the sibling FlashToy U8 speak the same protocol, and the vendor Android apps that drive them all wrap the same com.j0data.sdk library. Branding is not the discriminator and neither is the USB vendor ID: 0x5958 is unregistered and shared with printers that speak TSPL instead. What settles it is the wire format. Frames that start 1a 01, end a1, and checksum as CRC-32 with init 0xCA896ADE are this protocol, whatever the label on the case says.
NIIMBOT B1
203 dpi with a 384-dot (48 mm) head, narrower than the 50 mm stock it takes, which is the thing that catches people out. Designs up to 50 mm are accepted and the outer millimeter on each side is dropped. Gap, black-mark and transparent stock, density 1–5. Black-mark stock starts the page 4 mm early, so the driver leads it with that much blank feed.
Stock without an RFID tag prints blank. The job is accepted and the label feeds, but the firmware drops density to near zero when it reads no tag, so the paper comes out unmarked. This is the printer, not a bug here: the print dialog warns when the heartbeat reports paper with no tag, and shows the firmware and hardware revision so you know which image fits if you go looking for a patched one. The no-flash workaround is to close the lid with a genuine tag held against the underside of the case, then take it away.
Confirmed printing with the top-edge feed direction. The left direction, and the full range of stock types and densities, follow the protocol but have not each been run on real hardware.
Labeer Y43BT
A 4 in shipping-label printer at 203 dpi. It speaks plain TSPL, but its BLE module hides it: the 0x18F0 service it advertises accepts writes and ignores them, and the printer is actually on ff00, where every write costs a credit the printer hands back. The same unit is sold as Joysea and Forc.
It advertises twice, as Y43BT-XXXX and Y43BT-XXXX_LE; pick the _LE one in Chrome's chooser. It answers no status query, so the status dot stays gray; a printer that stops taking data still fails the job rather than hanging it. Label sizes here are whole millimeters, so 4 in stock is 102 mm and 1 in is 25. Verified on 4 × 6 in and 2 × 1 in gap stock; if small stock jams, look for adhesive left in the paper path.
Core Innovations CTP800BD
The CTP800BD is a 4 in shipping-label printer at 203 dpi, sold for 4 × 6 in labels. Its BLE module is the same family as the Y43BT's: TSPL on ff00, with 0x18F0 as the decoy. It takes the same 102 mm design, and a test raster burned the full 4 in. It advertises as Shipping Printer-XXXX.
One difference is in the flow channel: it grants ten write credits on connecting and never returns another, so the driver sends without waiting for credits. A whole 4 × 6 raster goes through that way without loss. The catch is that nothing is left to signal a fault: like the Y43BT it answers no status query, so a jammed or empty printer cannot stop the job, and the run carries on as if it printed. Verified on 4 × 6 in gap stock at density 8.
On Linux it needs one-time BlueZ setup. The printer runs classic Bluetooth and BLE on a single public address, and for a device like that BlueZ always connects over classic. The printer's services are only on BLE, so Chrome's connect fails with NetworkError before printrow sees anything. Two steps fix it:
Set
Experimental = truein/etc/bluetooth/main.confand runsudo systemctl restart bluetooth. That exposes BlueZ's per-devicePreferredBearersetting.With the printer on and in range, tell BlueZ to reach it over BLE, and trust it so the setting is kept. Replace the address with your printer's (from
bluetoothctl devices), written with underscores:busctl set-property org.bluez /org/bluez/hci0/dev_02_3F_05_B8_B8_63 org.bluez.Device1 PreferredBearer s le busctl set-property org.bluez /org/bluez/hci0/dev_02_3F_05_B8_B8_63 org.bluez.Device1 Trusted b true
Don't pair it in your desktop's Bluetooth settings: that pairs over classic, and BlueZ then uses classic regardless. Chrome on other platforms does not go through BlueZ and should need none of this, though only Linux has been tested.
POLONO PM220S
A battery-powered 2 in label printer at 203 dpi, with the B1's 384-dot (48 mm) head centered on 50 mm stock. Designs up to 50 mm are accepted and the outer 1 mm on each side is dropped. It speaks plain TSPL on ff00 like the two shipping printers, with density 0 to 15, and advertises as PM220S.
It is the one TSPL printer here that answers back. The status dot is real, the dialog shows its firmware and hardware versions, and the driver asks for its status before each label, so a fault stops the run instead of spooling into it. Its flow channel, on the other hand, says nothing at all, so writes go out unmetered at a fixed size.
Verified on POLONO's own 50 × 30 mm gap roll at density 8. Generic rolls work too. POLONO's rolls carry an RFID tag, but unlike the B1 this printer does not need one: a roll with no tag prints just as dark, also after the printer has been switched off and on with it loaded. One thing is not verified: only the ready and printing states have been seen on the wire, and the lid and paper faults follow the TSPL standard.
On Linux it needs the same one-time BlueZ setup as the CTP800BD, with its own address in the two commands, for the same reason: classic and BLE on one public address.
Have a different NIIMBOT? Only the B1 is supported here. For the rest of the family use niimblue, a browser label designer built on niimbluelib.
Browser support
Web Bluetooth is Chromium-only. Chrome on Linux additionally needs chrome://flags/#enable-web-bluetooth and a relaunch; #enable-web-bluetooth-new-permissions-backend is optional but lets a known printer reconnect with no scan. ChromeOS has it on by default. Everything except printing works in any modern browser. The CTP800BD and PM220S also need BlueZ set to reach them over BLE; see the CTP800BD's section.
Discovery deliberately filters by device name, never by service UUID: a service-UUID filter makes Chrome push a SetDiscoveryFilter UUID list to BlueZ, which segfaults bluetoothd 5.87 on desktop Linux.
How it works
The Y50P and B1 speak proprietary framed binary protocols (through yplib and nblib) and accept nothing but a 1-bit bitmap. The Y43BT, CTP800BD and PM220S speak TSPL through tsplib, which has fonts and barcodes of its own, but they go unused: they get a bitmap too. Everything is rendered host-side, which is what makes the preview trustworthy:
- A zod model is the single source of truth; Konva is a view of it. The same node builder feeds the editor canvas and the print rasterizer, so they cannot drift.
- The preview renders at the printer's real resolution: 203 dpi, hard 1-bit threshold, Atkinson dithering for photos. The dot grid on screen is the label, stair-steps and all.
- Barcodes snap their module grid to whole printer dots at any element size. Fractional modules are what make scaled barcodes both blurry and marginal under a scanner.
- Stock color and die-cut shape are preview-only. The head burns black onto whatever stock is loaded; a colored background reaching the thresholder would print the label solid black.
- Transport: BLE GATT writes in 20-byte chunks with pacing, with status (ready / cover open / out of paper) polled between labels on the printers that answer: the Y50P, B1 and PM220S.
- One driver seam covers all five printers, because below it they are shaped nothing alike: YPL streams a framed raster one way, NIIMBOT holds a request/response conversation with a reply expected per command, and the TSPL printers take plain TSPL, metered out by write credits where the printer returns them and checked by a status query where it answers one. The app hands a driver a canvas; everything under that belongs to the protocol library.
The wire formats are unforgiving in the same specific way, worth knowing if you fork this: a raster row that isn't the width the printer was told to expect shifts everything after it and can hang the firmware. All three libraries refuse to encode one rather than transmit it.
The heads are not the same width. The Y50P prints 50 mm (400 dots); the B1 and PM220S print 48 mm (384 dots), despite taking stock sold as 50 mm; the Y43BT and CTP800BD print 4 in (816 dots). A 50 mm design is accepted on the B1 and PM220S anyway: the driver trims 1 mm off each edge at print time, since that strip is bleed on every roll sold for it, and cropping keeps text and barcodes at their drawn size where scaling would not. Keep anything that matters a millimeter in from the long edges.
Print direction is a property of the label, not of the printer. It says which edge feeds first, which decides which of the design's two dimensions has to fit across the head; left rotates the raster a quarter turn. Pick the wrong one and the label prints sideways: invisible on square stock, obvious on anything else. Only the B1 exposes it; YPL always feeds top-first, and TSPL's DIRECTION is a half turn rather than a quarter, so it stays off on those printers too.
Development
bun install
bun run dev # http://localhost:5173
bun test src # editor undo history, template library, print feed and trim, barcode sizing, CSV, geometry
bun run check # svelte-check
Stack: SvelteKit 3 · Svelte 5 runes · Tailwind 4 · shadcn-svelte · Konva · zod · bwip-js · lucide · yplib · nblib · tsplib · bun
Deploying
nixpacks.toml builds with Bun and starts the adapter-node server, so Coolify needs no extra configuration:
bun install --frozen-lockfile → bun run build → node build
There is no database and nothing to persist server-side (templates live in the browser's IndexedDB, and the printer is reached from the browser), so the server only serves assets and the SSR shell. It listens on PORT (the adapter defaults to 3000 on 0.0.0.0). Pushes to main redeploy automatically.
Serve it over HTTPS. Web Bluetooth only works in a secure context, so on a plain-http origin the Connect button cannot do anything at all.
Credits
The Y50P protocol lives in yplib, reverse-engineered from HCI snoops of the manufacturer's Android app and verified by rebuilding whole print sessions byte for byte. Its FINDINGS.md is the full derivation.
The B1 protocol lives in nblib, a port of niimbluelib (MIT) by MultiMote; the reverse-engineering of the NIIMBOT format is entirely their work. nblib exists to be browser-only, dependency-free ESM that discovers by device name rather than by service UUID; its encoder is verified byte for byte against niimbluelib's across hundreds of rasters. Its ACKNOWLEDGEMENTS.md records what came from where.
The Y43BT's, CTP800BD's and PM220S's BLE interfaces were mapped by probing the hardware directly; tsplib's FINDINGS.md records how.
Have a FlashToy U8? Go to Souukou/OpenBluetoothPrinter (MIT), a separate derivation of the same protocol (they call it YPL) that targets that printer directly. Three status bits in protocol.ts come from their work and are credited there.
Bundled and redistributed by this app:
- Lucide (ISC) for the icon set, ~1,750 marks embedded in the bundle.
- bwip-js (MIT) for barcode and QR generation.
- Konva (MIT) for canvas rendering, zod (MIT) for the template schema, svelte-dnd-action (MIT) for layer reordering, and shadcn-svelte / bits-ui (MIT) for the interface components.
- Typefaces, all under the SIL Open Font License 1.1, served from Fontsource: Inter, Pacifico, Oswald, Source Serif 4, JetBrains Mono, Bebas Neue, Archivo Black, Playfair Display, Space Grotesk, Bricolage Grotesque for the wordmark, and IBM Plex Sans and IBM Plex Mono for the interface.
License
MIT © 2026 Shaun Lastra. See LICENSE.