BGZero
Auto RemoveManual RemoveBatch Remove
Blog
EN中文
Sign In
BG ZERO
All processing runs locally in your browser · No data uploaded · 100% private
ToolsChange Image Background ColorProduct Photo White BackgroundID Photo Background ChangerPassport Photo Background ChangerTransparent PNG MakerBatch Background Remover
BGZero

AI-powered background removal tool
Runs locally in browser, zero data upload

Open Source Licenses

  • Default engineAGPL-3.0
  • Transformers.jsCC BY-NC 4.0
  • rembg-webMIT
Privacy PolicyTerms of ServiceOpen Source LicensesAccessibilityDMCAContactSource Code (AGPL-3.0)Report Abuse
© 2026 BG Zero. Released under AGPL-3.0.Made with care · Local first
Back to Tutorials

Offline Background Remover: Remove Backgrounds After the First Model Load

BG-Zero downloads AI model files once, caches them in your browser, and then removes backgrounds from images without any internet connection. Here's how offline mode works.

This article is part of our guide on removing backgrounds without uploading images. Read the complete guide here.

Can an AI Background Remover Work Offline?

Yes — with one condition. AI background removal needs a neural network model. BG-Zero downloads this model once on your first visit, then caches it in your browser. After that, all processing works offline.

What "Offline After First Load" Means

BG-Zero is not a fully offline desktop app — it's a web app that becomes offline-capable after the first visit:

  • First visit: Your browser downloads the AI model file (40MB–176MB depending on engine)
  • Model is stored in browser cache (IndexedDB / Cache Storage)
  • Subsequent visits: No internet needed — processing runs entirely on cached model

Why AI Model Files Need to Be Downloaded Once

A browser-based offline background remover usually depends on more than one file. The visible web page is only the entry point. Behind it, the browser may need JavaScript bundles, WebAssembly runtime files, model weights, tokenizer or preprocessing metadata, worker scripts, and configuration files that describe how the model should be loaded. Once these assets are available, the app can run image segmentation locally without sending the selected image to a remote processing API.

01

Model Weights

The model weights are typically the largest part of this structure. They contain the learned parameters that allow the model to recognize subjects, edges, and background regions.

02

Runtime Files

Runtime files such as WebAssembly modules or worker scripts help execute the model efficiently in the browser. Configuration files help the app know input size, preprocessing rules, output format, and which runtime path to use.

03

First Run vs Later Runs

On the first run, the browser downloads model and runtime assets. On later runs, those assets may already be cached, so the app starts faster and may continue to work offline, depending on browser storage state.

The image stays local, but the tool still needs to load its AI engine into the browser. Offline support is about caching that engine and the application shell, not about uploading the user's photo.

Diagram showing the browser offline model file structure: app shell, model weights, WASM runtime, and worker scripts

How Browser Caching Makes Repeat Visits Faster

Offline support in a browser is usually built from several storage mechanisms. Cache Storage is commonly used for request/response assets such as the app shell, JavaScript bundles, style files, WebAssembly files, and model files fetched by URL. It works well with a service worker because the service worker can intercept requests and return cached responses when the network is unavailable.

  • Cache Storage keeps the app and model assets available across sessions, working naturally with service workers
  • IndexedDB is a structured browser database that can store records, metadata, blobs, settings, and application state — useful for model metadata, user preferences, or optional local project state
  • A good offline architecture uses both: Cache Storage for app/model assets, IndexedDB for structured metadata and settings
CapabilityCache StorageIndexedDBOffline Remover Usage
Best forURL-based request/response assetsStructured records, metadata, blobs, app stateUse both for different jobs
Common assetsApp shell, JS, CSS, WASM, model filesPreferences, metadata, local-only historyCache model/runtime; store settings if needed
Service workerWorks naturallyIndirectly, via app or worker logicSW returns cached model files
Update strategyVersion caches and refresh changed assetsMigrate object stores and recordsKeep model versions explicit
Privacy concernCached app/model files are not user uploadsCould store user data if app chooses toAvoid storing source images unless disclosed
User controlClear site data / browser cacheClear site data / app-provided controlsProvide clear reset/cache guidance

Caching app assets is not the same as uploading user images. If a product stores any user-generated image locally, it should clearly explain where it is stored, how long it stays there, and how the user can delete it.

Comparison diagram of Cache Storage and IndexedDB for browser offline storage

Best Offline-Friendly Workflow in BG-Zero

To ensure you can use BG-Zero offline when needed:

01

Load Models While Online

Visit BG-Zero and process at least one image with each engine you plan to use offline.

02

Verify Cache

Open DevTools → Application → Storage to confirm model files are cached.

03

Go Offline

Disconnect from internet or enable airplane mode. BG-Zero will still process images.

04

Process & Download

Upload images, remove backgrounds, and download PNGs — all without network.

Limitations You Should Know

Offline background removal has real limitations. Understanding them helps set correct expectations and design better workarounds.

First run still needs a network connection

Offline background removal means "offline after the required assets are cached," not "fully available before the first visit." The first run may need to download the app shell, model files, WebAssembly runtime, and worker scripts.

Explain clearly in the UI: "Open once while online to prepare offline use." Show a readiness indicator after model and runtime files are cached.

Browser storage can be cleared

Users can clear site data manually, private browsing modes may discard storage, and browsers may remove cached data under storage pressure or policy constraints.

Treat offline readiness as a state that can change. Provide a "check offline readiness" action and a simple way to re-download model assets when needed.

Performance varies by device

Running AI in the browser depends on CPU, memory, GPU availability, browser version, and image size. A modern desktop may process images smoothly, while an older phone may be slower.

Offer practical controls: resize large images before inference, show progress states, provide a lower-memory mode, and fall back to WASM when WebGPU is unavailable.

Offline does not mean zero network activity forever

Even an offline-capable app may check for updates, load new model versions, or fetch documentation. The important distinction is whether the source image is uploaded for processing.

Separate network categories in product copy: app/model assets, optional analytics, and user images. State clearly that the original image is not uploaded.

Browser and enterprise policies may block features

Some browser features can be restricted by enterprise policy, content security settings, storage rules, private browsing, or older browser versions.

Use feature detection instead of assumptions. Show meaningful fallback messages, provide a compatibility checklist, and keep a basic processing path available.

Diagram showing the five limitations of offline background removal and their workarounds

Offline = Maximum Privacy

  • No network connection means it is physically impossible for images to be transmitted
  • You can verify by monitoring network activity — zero outgoing requests during processing
  • Perfect for air-gapped environments, sensitive workflows, and compliance requirements

Related Articles

Background Remover Without Uploading: Complete GuideClient-Side Background Removal: How AI Runs in Your BrowserRemove Backgrounds from Sensitive Photos Without Uploading

Offline Background Removal FAQ

Common questions about using BG-Zero without internet

After the first visit, yes. The AI model files are cached in your browser. Once cached, you can disconnect from the internet and still remove backgrounds from images.

The AI model file for your chosen engine: imgly (44MB default, optional 88MB or 176MB upgrades), Transformers.js (~176MB), or rembg-web (4.7MB–176MB depending on model). These are neural network weights, not your images.

Until you clear your browser cache or storage. Under normal use, models remain cached indefinitely. If cleared, they will re-download on the next visit.

Yes, as long as each engine model was loaded at least once while online. Each engine caches independently — you can switch between cached engines offline.

Currently BG-Zero is a web app. However, since all processing is local after cache, it works like a desktop app once models are cached. You can also self-host BG-Zero on a local server for air-gapped environments.

Try Offline Background Removal

Load the model once, then remove backgrounds anytime — no internet needed.

Open BG-Zero