If you have ever needed a clean product photo, a profile picture, or a cutout for a design, you have probably used remove.bg. It was one of those small tools that just worked — until it didn't.
On 1 December 2026, remove.bg's standalone website and self-serve API shut down, and background removal moved behind Canva Pro / Leonardo.Ai. That left a lot of people — developers, designers, sellers, and hobbyists — without the simple, free tool they relied on.
So I built a replacement: OpenBG. It is free, open-source, and self-hosted, and it runs entirely on your own machine.
Why it exists
A free tool disappearing behind a paywall is a familiar story. I wanted something that could not be taken away in the same way: no account to create, no API key to buy, no usage counter ticking up in the background, and no images uploaded to someone else's server.
OpenBG is my answer to that. It does one job — remove the background from an image — and it does it locally.
What it does
OpenBG runs the MIT-licensed BiRefNet ONNX model fully on your own machine, in Rust + ONNX Runtime. It is a single binary that gives you three tools in one:
- A command-line tool for removing the background from one image
- A batch processor for whole folders of images
- An HTTP API server that is wire-compatible with the remove.bg API, so you can point existing client code at it by changing one URL
It is free, with no API keys, no signups, and no rate limits. It is MIT-licensed, including the model: it uses BiRefNet-general, unlike rembg's RMBG-2.0, which is not free for commercial use. And because everything runs locally, your images never leave your machine.
How to build it
You will need Rust 1.75 or newer. Then clone the repository and build it:
git clone https://github.com/ViraBuilds/openbg.git cd openbg cargo build --release The first run downloads the ONNX model (about 224 MB) into your user cache directory. After that, you are ready to go.
The three ways to use it
1. Remove the background from one image
openbg remove photo.jpg -o photo-nobg.png That is the quickest way to use it: one image in, one transparent PNG out.
2. Process a whole folder
openbg batch ./input_folder -o ./output_folder Batch mode supports png, jpg, jpeg, webp, bmp, tif, and tiff files. Two handy flags are --recursive, to walk through subfolders, and --skip-existing, to leave files you have already processed alone. This is the mode for product catalogues, photo sets, or any folder that would take forever to process one image at a time.
3. Run it as an API server
openbg serve --port 8080 This starts a drag-and-drop web demo at localhost:8080, and an API you can POST to at /v1.0/removebg. Because the server is wire-compatible with the remove.bg API, existing code that used remove.bg can keep working — change one URL and point it at your own server instead.
That last point is the one I care about most. A lot of small apps and scripts were built around that API. OpenBG is meant to give them a place to go, without a subscription.
Who it is for
- Developers who want background removal in a script or an app, without an API key or a bill
- Designers and sellers who need clean cutouts for product photos and listings
- Anyone who cares about privacy, because the images stay on their own machine
- Beginners who want a small, practical Rust project to build, run, and learn from
If any of that sounds like you, give it a try and let me know how it goes. Issues and pull requests are welcome on the repository.
You can also see more of what I am building on my portfolio.

