---
slug: "mac-chrome-open-from-commandline-fixed-size"
title: "How to Open a Specific URL with Chrome in a Specified Window Size from the Command Line on Mac"
description: "Here is how to open Chrome with a specified window size from the command line on a Mac."
url: "https://www.ytyng.com/en/blog/mac-chrome-open-from-commandline-fixed-size"
publish_date: "2023-12-12T00:22:07Z"
created: "2023-12-12T00:22:07Z"
updated: "2026-02-27T10:13:28.490Z"
categories: ["mac"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20250615/cb208bf4970d41c8a2066456c6c35497.png.webp?width=768"
has_video: true
has_music: true
video_urls: ["https://media.ytyng.net/ytyng-blog/297/featured-video-1.mp4", "https://media.ytyng.net/ytyng-blog/297/featured-video-2.mp4", "https://media.ytyng.net/ytyng-blog/297/featured-video-3.mp4"]
music_urls: ["https://media.ytyng.net/ytyng-blog/297/featured-music-297-3.mp3", "https://media.ytyng.net/ytyng-blog/297/featured-music-297-4.mp3"]
lang: "en"
---

# How to Open a Specific URL with Chrome in a Specified Window Size from the Command Line on Mac

Here is how to open Chrome with a specified window size from the command line on a Mac.

This method is useful when launching web applications or notes from a launcher.

```shell
open -na "Google Chrome" --args --new-window --app="data:text/html,<html><body><script>window.moveTo(0,0);window.resizeTo(500,800);window.location='https://www.example.com';</script></body></html>"
```

### Reference
[bash - Launch Google Chrome from the command line with specific window coordinates - Stack Overflow](https://stackoverflow.com/questions/13436855/launch-google-chrome-from-the-command-line-with-specific-window-coordinates)
