Flutter Run Chrome: Run Your App in the Browser Without an Emulator
The fastest way to open a Flutter project in Chrome without an emulator is flutter run -d chrome. You'll verify web support, try web-server mode, run release builds, and fix the errors that come up.

Contents
Readers who arrive via a flutter run chrome search usually get stuck in the same place: no emulator is installed and the command doesn’t give the expected result. The shortest way to run a Flutter app in the browser is the flutter run -d chrome command, and it doesn’t need the Android SDK or an emulator. This lesson is written for the current Flutter stable release and a current Google Chrome; the steps are followed in the same order on Windows 11 and Ubuntu 24.04. The lesson is part of the “Mobile App Development with Flutter” series.
What you’ll learn in this lesson
- How to run a Flutter project in the browser with
flutter run -d chrome. - How to verify web support by reading the output of
flutter devicesandflutter doctor. - How to run in browsers other than Chrome using web-server mode and port settings.
- How to recognize and fix Chrome not found, no devices and CORS errors.
- How to explain the difference between a debug run, a release run and
flutter build web.
As a prerequisite, having the Flutter SDK installed and basic terminal skills is enough. If you haven’t installed the SDK yet, just follow the steps on Flutter’s official installation page; this lesson picks up where that installation ends.
Flutter run chrome: the single command that runs your app in Chrome
Short answer Just run flutter run -d chrome in the project folder. The -d (device) parameter selects the target device, and the value chrome tells Flutter that the target is the Chrome browser. Flutter first compiles the project, then opens Chrome with a separate profile folder and serves the app in that tab. Also known as the flutter run web command, it lets you develop in the browser without touching a mobile target at all.
In the flutter run chrome command written without -d, the word chrome is treated as a target file name and the command fails. In other words, the -d flag is required to select the device.
Target file "chrome" not found.
flutter run -d chrome
While the command runs, the terminal shows the build steps, then the connection to the debug service and the list of shortcut keys. The expected output looks like this; the port number and connection address change on every run.
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
This app is linked to the debug service: ws://127.0.0.1:54213/AbCdEf123...
Debug service listening on ws://127.0.0.1:54213/AbCdEf123...
Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
Closing the Chrome tab or pressing q in the terminal ends the session. The first run takes noticeably longer than later runs because it performs a build.
Before you start: is web support enabled?
In current Flutter stable releases, web support is enabled by default, and projects you create new come with the web target ready. Still, you can verify with two commands whether web support is disabled in an older project or after a configuration reset.
Seeing Chrome with flutter devices
flutter devices lists the devices Flutter can currently use as targets. If the list contains a Chrome (web) line, -d chrome will work; if the line is missing, you should look at the error section below.
flutter devices
The outputs below are expected sample outputs; the browser and operating system version numbers will look different on your machine. On Windows 11 the list contains three lines: the Windows desktop target, Chrome and Edge.
Found 3 connected devices:
Windows (desktop) • windows • windows-x64 • Microsoft Windows Version 10.0.2xxxx
Chrome (web) • chrome • web-javascript • Google Chrome 1xx.x.xxxx.xx
Edge (web) • edge • web-javascript • Microsoft Edge 1xx.x.xxxx.xx
On Ubuntu 24.04, if Edge isn’t installed the list drops to two lines and the desktop target appears as Linux.
Found 2 connected devices:
Linux (desktop) • linux • linux-x64 • Ubuntu 24.04.1 LTS
Chrome (web) • chrome • web-javascript • Google Chrome 1xx.x.xxxx.xx
The “Found N connected devices” line at the top replaced the “N connected devices” form used in older versions. What matters is that the Chrome (web) line is there.
flutter config –enable-web and the flutter doctor check
flutter config --enable-web enables the web target. In current versions this setting is already on, so the command often changes nothing; even so, it’s the first step to try on older projects. flutter doctor -v, on the other hand, shows the path to Chrome and any general installation problems.
flutter config --enable-web
flutter doctor -v
In an emulator-free setup, the Chrome line in the doctor output appears with a checkmark, while the Android toolchain line appears with a cross. This is normal and doesn’t block web development. The output below is a sample; the version numbers will be different on your machine.
[✓] Flutter (Channel stable, 3.xx.x, on Ubuntu 24.04.1 LTS, locale tr_TR.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
[✓] Chrome - develop for the web
• Chrome at /usr/bin/google-chrome
[✓] Linux toolchain - develop for Linux desktop
Don’t see the cross next to the Android line and assume your installation is broken; if you’re only going to work with the browser target, you can ignore this warning.
Step by step: opening a new project in Chrome
In a new project, the flow consists of three commands: create the project, enter the folder, and run it with the Chrome target. If you’re only going to try out web, you can pass --platforms=web to get a lighter project without creating Android and iOS folders at all.
flutter create and flutter run -d chrome
flutter create --platforms=web sayac_app
cd sayac_app
flutter run -d chrome
When you replace the project’s lib/main.dart file with the complete example below, you’ll see a clickable counter in the browser. The example runs in a single file and doesn’t require any external packages.
import 'package:flutter/material.dart';
void main() {
runApp(const SayacUygulamasi());
}
class SayacUygulamasi extends StatelessWidget {
const SayacUygulamasi({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Chrome Sayac',
debugShowCheckedModeBanner: false,
home: const SayacSayfasi(),
);
}
}
class SayacSayfasi extends StatefulWidget {
const SayacSayfasi({super.key});
@override
State<SayacSayfasi> createState() => _SayacSayfasiState();
}
class _SayacSayfasiState extends State<SayacSayfasi> {
int _sayi = 0;
void _artir() {
setState(() {
_sayi++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Flutter Run Chrome')),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('Sayac: $_sayi', style: const TextStyle(fontSize: 24)),
const SizedBox(height: 12),
ElevatedButton(
onPressed: _artir,
child: const Text('Arttir'),
),
],
),
),
);
}
}
In this example, the state is kept inside a single widget; as the app grows, you’ll need to manage state from a single place. At this point, you can take a look at the Application Architecture with State Management Provider in Flutter lesson.
How do hot reload / hot restart work in the browser?
While the app is running, focus the terminal and press r to start hot reload, press R to start hot restart; q closes the session. In Flutter 3.35 and later, hot reload (r) is enabled by default on the web; in 3.32 it arrived as experimental behind the --web-experimental-hot-reload flag. So in the current stable release you don’t need to add an extra flag—just verify your version.
flutter --version
If your version is older than 3.35, just use flutter upgrade to move to the current stable release. Hot restart resets the app’s state and runs the code again; that’s why the counter value resets. Refreshing the page in the browser gives the same result but is slower.
Another browser instead of Chrome: Firefox, Edge, and web-server mode
Flutter recognizes Chrome and, on Windows, Edge directly as devices; it does not recognize Firefox. To run in browsers like Firefox, Brave, or Chromium, use the web-server device and open the given address manually in the browser. To run in Edge on Windows, a single command is enough.
flutter run -d edge
flutter run -d web-server –web-port 8080
This mode serves the app as a local HTTP server without opening a browser; this is what a flutter run web server search refers to. It’s especially useful when you start out intending to use flutter run firefox and want to test in Firefox, and when you want to open the page from a phone on the same network.
flutter run -d web-server --web-port 8080 --web-hostname 127.0.0.1
lib/main.dart is being served at http://127.0.0.1:8080
When you paste the address into Firefox, the app opens. If you want to access it from another device on the same network, pass --web-hostname 0.0.0.0 and use your computer’s local IP address; make sure your firewall isn’t blocking this port. If you don’t specify a port, Flutter picks a free one; to keep the address from changing every time, it’s more convenient to specify a fixed port.
Opening in your normal Chrome instead of a new profile
Short answer To open the app in your normal Chrome window, serve it with flutter run -d web-server --web-port 8080 and visit the address in your own Chrome profile. Because Flutter launches the browser with a temporary profile folder in -d chrome mode, your sessions, extensions, and saved passwords aren’t visible in that window.
flutter run -d web-server --web-port 8080
In this mode, you may see the message “Waiting for connection from Dart debug extension” in the terminal: since Flutter doesn’t connect to Chrome itself, the debugging connection is established on the browser side. If the Dart Debug Extension isn’t installed or the version you’re using doesn’t support this connection, the r and R shortcuts may not work; in that case, you need to refresh the page manually to see changes. The most practical approach is to test whether the shortcuts work on your first try.
If you want a persistent profile, as an additional option you can pass a separate --user-data-dir with --web-browser-flag, but there’s a chance it will conflict with Flutter’s own temporary profile argument; so try the web-server route first.
Flutter without an emulator: development on a low-RAM computer
An Android emulator alone consumes several gigabytes of RAM; you don’t have to pay that cost just to try Flutter. The running Flutter without an emulator path is limited to these three components: the Flutter SDK, Chrome, and an editor. Even if the Android SDK and emulator aren’t installed, the web target works without issues.
- Download the Flutter SDK, extract it from the archive, and add the
flutter/binfolder to PATH. - Open a new terminal and verify the installation with
flutter --version. - If Chrome isn’t installed, install it; then look for the
Chrome (web)line in theflutter devicesoutput. - Create a lightweight project with
flutter create --platforms=web sayac_app. - After
cd sayac_app, open the app withflutter run -d chrome.
With this setup, flutter doctor will give warnings about the Android toolchain; web development isn’t affected by these warnings. When you work only with the browser target, disk space and RAM usage drop noticeably.
Running in release mode and the build web difference
Short answer flutter run -d chrome --release runs the app in optimized form and hot reload is disabled; flutter build web produces production-ready files in the build/web folder. The first is for testing behavior, the second is for deploying. In short, flutter run web release is for performance checks, while build web is for publishing.
| Command | What it does | Hot reload | When to use it |
|---|---|---|---|
flutter run -d chrome |
Builds a debug version, opens Chrome | Yes (default in 3.35+) | Daily development |
flutter run -d chrome --release |
Builds a release version, opens Chrome | No | To see performance and build differences |
flutter build web |
Produces static files under build/web |
No | To upload to a server |
flutter run -d chrome –release
flutter run -d chrome --release
In release mode, debugging symbols are limited and code isn’t reloaded, so it isn’t suitable for chasing down a bug. On the other hand, it’s the right option for seeing the behavior of the version that will reach users and the build optimizations.
Serving the flutter build web output locally
The build output must be opened through an HTTP server; opening the file directly via file:// results in a blank page. Python’s built-in server is enough for this; on Windows, use py instead of python3.
flutter build web
cd build/web
python3 -m http.server 8000
py -m http.server 8000
Then, when you open http://localhost:8000 in your browser, you’ll see the release version of the app. If you’re going to publish the app in a subdirectory, you need to pass flutter build web --base-href=/alt-dizin/.
Command cheat sheet
The following table gathers the flutter run variants covered in this lesson in one place. The line you’ll use most often in your daily workflow is the command in the first row.
| Command | What it does | Typical usage |
|---|---|---|
flutter devices |
Lists the devices available as targets | flutter devices |
flutter config --enable-web |
Enables the web target | flutter config --enable-web |
flutter create --platforms=web . |
Adds the web target to an existing project | flutter create --platforms=web . |
flutter run -d chrome |
Runs in debug mode in Chrome | flutter run -d chrome |
flutter run -d edge |
Runs in debug mode in Edge (Windows) | flutter run -d edge |
flutter run -d web-server |
Serves it on a local server without opening a browser | flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0 |
flutter run -d chrome --release |
Runs it with a release build | flutter run -d chrome --release |
flutter run -d chrome --wasm |
Runs it with a WebAssembly build | flutter run -d chrome --wasm |
flutter build web |
Produces the release files under build/web |
flutter build web |
flutter build web --base-href |
Defines the path for publishing in a subdirectory | flutter build web --base-href=/alt-dizin/ |
Common errors and their fixes
Short answer Nearly all errors fall into three buckets: the project has no web target or Chrome doesn’t show up as a device, Chrome’s executable can’t be found, or the browser’s CORS rule blocks the request. The table below gives the shortest path from symptom to fix.
| Symptom | Cause | Fix |
|---|---|---|
| “No supported devices connected” | The project has no web folder, web support is disabled, or Chrome can’t be found | flutter create --platforms=web . and flutter config --enable-web |
| “No supported devices found with name or id matching chrome” | Chrome isn’t installed, isn’t on the PATH, or CHROME_EXECUTABLE is wrong | Verify the Chrome installation and the CHROME_EXECUTABLE variable |
| “Cannot find Chrome executable” | Chrome is in a different location, or you’re using Chromium/Brave | Set the CHROME_EXECUTABLE variable |
| Renderer flag error | --web-renderer html is no longer supported |
Drop the flag and write the command plainly |
| “XMLHttpRequest error” | The API doesn’t send a CORS header | Add Access-Control-Allow-Origin on the server |
| “Failed to bind web development server” | The port is in use by another process | Pick a different port with --web-port |
“No supported devices connected”
This message tells you that Flutter couldn’t find a suitable device for the given target. The most common cause is that the project was created without a web folder: for example, if the project was generated with --platforms=android, or it’s an older project whose web support was removed, Flutter considers the project unsupported for the web target even if it does list Chrome. The second most common cause is web support being turned off, and the third is Chrome not being found at all.
To add the web target to an existing project, run the following command inside the project folder. The trailing dot applies the command to the current folder and doesn’t delete your existing files.
flutter create --platforms=web .
flutter config --enable-web
flutter devices
flutter run -d chrome
If Chrome doesn’t show up in the flutter devices output, check your Chrome installation and PATH. If you installed Chrome via Snap or Flatpak on Linux, Flutter may not find it at the expected path; in that case, move on to the environment variable setup below. The message “No supported devices found with name or id matching chrome” tells you there’s no target in the device list matching the chrome id, and it leads to the same path check.
If more than one device is connected, adding -d chrome removes any ambiguity about which target will launch; if Chrome is the only suitable device, Chrome is selected even without -d.
“Cannot find Chrome executable” and the CHROME_EXECUTABLE variable
Flutter looks for Chrome in the standard installation paths; if the browser is in a different folder, or you’re using Chromium/Brave, you have to supply the path manually with the CHROME_EXECUTABLE environment variable. First verify which executable is installed, then use that path.
which google-chrome
which chromium
which chromium-browser
| Environment | Browser | Typical path |
|---|---|---|
| Windows 11 | Google Chrome | C:\Program Files\Google\Chrome\Application\chrome.exe |
| Windows 11 | Brave | C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe |
| Ubuntu 24.04 | Google Chrome (deb) | /usr/bin/google-chrome |
| Ubuntu 24.04 | Chromium (snap) | /snap/bin/chromium |
| Ubuntu 24.04 | Brave | /usr/bin/brave-browser |
| Debian | Chromium (apt) | /usr/bin/chromium |
For a persistent setting on Windows, use setx in PowerShell or the .NET method; you then need to open a new terminal, since the variable won’t appear in terminals that are already open.
setx CHROME_EXECUTABLE "C:\Program Files\Google\Chrome\Application\chrome.exe"
[Environment]::SetEnvironmentVariable("CHROME_EXECUTABLE", "C:\Program Files\Google\Chrome\Application\chrome.exe", "User")
On Linux, the export command only applies to that terminal session; to make it permanent, add the line to your shell configuration file and reload it.
echo 'export CHROME_EXECUTABLE=/usr/bin/google-chrome' >> ~/.bashrc
source ~/.bashrc
To verify the variable, you can use echo $CHROME_EXECUTABLE (Linux) or echo %CHROME_EXECUTABLE% (Windows).
The –web-renderer html flag error (the current situation)
Short answer --web-renderer html is no longer used. According to Flutter’s official announcements, the HTML renderer was removed in version 3.29; on the current stable release this flag doesn’t accept the value html and the command fails. The line flutter run chrome --web-renderer html, copied from an old blog post, is out of date both in its device parameter and its renderer value.
Today web output is produced with CanvasKit by default. On the WebAssembly side, compiling with --wasm is supported on the stable channel; you should use that option instead of the renderer flag. For the details of the removal process you can check Flutter’s breaking changes page, and for build options the official web build documentation.
flutter run -d chrome --wasm
CORS errors on API requests
Short answer The browser blocks a request to an API on a different domain if CORS headers are missing; this isn’t a Flutter error, it’s a browser security rule. The permanent fix is to return the Access-Control-Allow-Origin header on the API side.
During development you can temporarily disable browser security. The command below works as-is on Windows and Linux; since Flutter already uses its own temporary profile folder, you don’t need to pass --user-data-dir separately.
flutter run -d chrome --web-browser-flag "--disable-web-security"
You shouldn’t use the browser opened with this setting for regular browsing; carrying the same flag over to production creates a security hole. The right approach is to add CORS headers to the API and put http://localhost:PORT in the list of allowed origins for local development.
Selecting Chrome as a target from VS Code and Android Studio
Short answer In VS Code, pick “Chrome” from the device list in the Debug panel; in Android Studio, “Chrome (web)” shows up in the device menu on the toolbar. This selection does the same job without typing the command by hand.
Once the Flutter extension is installed in VS Code, a device selector appears in the status bar. To make Chrome your permanent target, add the following configuration to the .vscode/launch.json file.
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"deviceId": "chrome"
},
{
"name": "Chrome (port 8080)",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"deviceId": "chrome",
"args": ["--web-port", "8080"]
}
]
}
Here’s what the fields do in short: name is the label shown in the list, request and type select the Flutter debugger, program specifies the entry file to run, deviceId pins the target to Chrome, and args passes extra flags to the flutter run command. Without deviceId, the configuration runs on the default device and Chrome may not open.
If Chrome doesn’t appear in the device menu in Android Studio, run flutter devices in the terminal and check the list; the problem usually comes from the IDE pointing to an old Flutter SDK path. If the device list looks correct in the terminal but not in the IDE, restarting the IDE is enough.
Common Mistakes
- Symptom: The command runs, but the browser shows a blank page. Cause: The
flutter build weboutput was opened viafile://. Fix: Serve the output through an HTTP server. - Symptom: Code changes don’t show up in the browser. Cause: You’re running in release mode, or your Flutter version is older than 3.35, where web hot reload became the default. Fix: Run in debug mode; if your Flutter version is older than 3.35, run
flutter upgrade. - Symptom: A port error when two
flutter runsessions are open at the same time. Cause: The same web port is being bound twice. Fix: Give the second session a different port with--web-port. - Symptom: A CORS error that only seems fixed in production. Cause:
--disable-web-securitywas used locally. Fix: Configure the CORS headers on the server side. - Symptom:
flutter run chromegives “Target file not found”. Cause: The-dflag was forgotten. Fix: Write the command asflutter run -d chrome. - Symptom: The project won’t open in Chrome and says “No supported devices connected”. Cause: The project was created without the web target. Fix: Run
flutter create --platforms=web .in the project folder. - Symptom: The
rkey does nothing in web-server mode. Cause: The debugging connection on the browser side wasn’t established, or the Dart Debug Extension isn’t installed. Fix: Install the extension or refresh the page manually.
Frequently Asked Questions
Does Flutter run on the web, and does mobile app code open in the browser as-is?
Yes, Flutter supports the web target and runs the same Dart code in the browser. However, the camera, the file system and some platform channels behave differently in the browser, so you may need to separate device-specific code conditionally.
What is the Flutter run command for Chrome?
The command you need to run in the project folder is flutter run -d chrome. If you don’t write -d, Flutter picks from the connected devices: if the only suitable device is Chrome, it uses that one; if there are multiple devices, it asks which one to use. To remove that ambiguity, writing -d chrome is the cleanest path.
Is Flutter still used in 2026, and is it worth learning?
Flutter is an open-source UI toolkit developed by Google, and its stable release channel is updated regularly. Because it lets you target mobile, web and desktop from a single codebase, it remains a tool worth learning, especially for small teams.
Does Google use Flutter?
Google is the company that develops Flutter, and the official Flutter showcase page lists examples from Google’s own products; Google Pay and Google Ads stand out among them. You can verify the current list at flutter.dev/showcase.
How do I test Flutter without an emulator?
You can test the app in the browser with the flutter run -d chrome command without installing an emulator. This path both reduces RAM usage and doesn’t require an Android SDK installation; however, touch gestures and device sensors need a real device or an emulator.
How do I run a Flutter app in Firefox?
Firefox isn’t a device Flutter recognizes directly, so you need to serve the app with the flutter run -d web-server --web-port 8080 command and open the address in Firefox. In other words, there’s no command like flutter run firefox; web-server mode is what covers this need. After opening the address once, you have to refresh the page to see code changes.
Summary and Next Lesson
- The shortest way to run Flutter in the browser is the
flutter run -d chromecommand; typing it without-dgives an error. - Web support is enabled by default in current versions; when in doubt, verify with
flutter config --enable-webandflutter devices. If the project has no web folder,flutter create --platforms=web .adds it. - For browsers like Firefox and Brave, use
-d web-servermode, use--web-portto pin the port; for Edge,flutter run -d edgeis enough. - When Chrome can’t be found,
CHROME_EXECUTABLEis the fix; for CORS errors, server-side headers are the fix. - Use
--releaseto try it out andflutter build webto ship it.
In the next lesson of the series, we’ll cover “Widget Tree and Layout Basics in Flutter”: we’ll build a screen with Row, Column and Container, trying it out step by step with live reload in the browser.
Lesson complete · 1 / 1
You've finished this lesson
The next lesson in the series is in the works. Subscribe to the channel so you don't miss it when it's published.
Share it if it helped