logo
search
list

Table of Content

Why Chrome blocks file:// links from websites
How to open a local file in Chrome (everyday methods)
Workarounds when you need file:// behavior (extensions & flags)
Plain-text paths: when the “link” is just text
For developers: open and save local files the compliant way
Another option: open Office paths in WPS after Chrome gets you there
FAQ
Summary

Chrome Open File: Local Files, file:// Links, and Safe Workarounds

Posted by Algirdas Jasaitis

calendar

2026-08-13

views

870

likes

4

Quick answer: To open a file in Chrome, press Ctrl + O (Mac: ⌘ + O) and pick a local PDF, HTML, image, or text file—or drag it onto a tab. Chrome can open files you choose. What it blocks by design are website file:// links that try to reach your disk without you opening them first.

Chrome blocking a file:// link from a website for security  
Chrome blocking a file:// link from a website for security

Searches for “chrome open file” usually mix four jobs: understand the security block, open a real local file anyway, deal with plain-text paths that are not hyperlinks, and (for developers) read/write files through modern browser APIs. This guide covers each layer in US-English Chrome on Windows and Mac.

100% secure

Why Chrome blocks file:// links from websites

If you click a link that starts with file:/// on an intranet page, wiki, or email-rendered HTML and nothing happens—or Chrome reports access denied—that is the sandbox working as designed.

  • Web origin vs your disk: A normal https:// page must not silently read C:\ or /Users/. Letting remote (or even local-network) pages open arbitrary files would be a serious data-leak risk.

  • Same idea as CORS, different surface: Browsers isolate origins so one site cannot freely pull resources from another place you did not authorize. Local filesystem URLs are treated as a privileged zone, not a public website.

  • Not the same as “Chrome can’t open files”: You can still open local files when you initiate it (keyboard shortcut, drag-and-drop, Open with, typing file:/// yourself).

So the pain point is rarely “Chrome has no Open command.” It is “a webpage tried to open my computer for me, and Chrome said no.”

How to open a local file in Chrome (everyday methods)

  1. Open a new tab.

  2. Press Ctrl + O on Windows/Linux/Chromebook, or ⌘ + O on Mac.

  3. Select the file and click Open.

Chrome Open File dialog after pressing Ctrl+O  
Chrome Open File dialog after pressing Ctrl+O
  • Drag and drop: Drag a PDF, HTML, image, or text file onto a Chrome tab.

  • Address bar: Type a path such as file:///C:/Users/You/Documents/report.pdf (use forward slashes) and press Enter.

  • Open with: In File Explorer / Finder, right-click → Open with → Google Chrome (ideal for PDFs and HTML previews).

  • Downloads: After a download finishes, open it from the download shelf or chrome://downloads. For PDFs, Settings → Privacy and security → Site settings → Additional content settings → PDF documents → Open PDFs in Chrome.

Chrome previews web-friendly types well. Word/Excel/PowerPoint files usually hand off to a desktop app rather than becoming editable inside the browser.

Workarounds when you need file:// behavior (extensions & flags)

Enterprise wikis and older intranet tools still publish file:// hyperlinks. If you must keep that workflow, use an explicit, user-controlled workaround—not a silent bypass.

  1. Install a reputable extension designed for local file links (search the Chrome Web Store for names like Open Local Files / Enable local file links).

  2. Open chrome://extensions, click Details on that extension.

  3. Turn on Allow access to file URLs (and set site access as required).

  4. Retry the link with a real click—extensions generally react to user gestures, not background page scripts.

Chrome extension details with Allow access to file URLs enabled  
Chrome extension details with Allow access to file URLs enabled

Developer-only flag: Launching Chrome with --allow-file-access-from-files can let one local HTML page load other local files/scripts while you test offline pages. Treat it as a temporary lab shortcut on a trusted machine—do not make it your everyday Chrome profile. Prefer a local static server (http://localhost) for ongoing front-end work.

Plain-text paths: when the “link” is just text

A common efficiency trap: the note says D:\Reports\2026\summary.xlsx as plain text—not an . Chrome has nothing to click.

  1. Copy the path.

  2. Paste it into File Explorer’s address bar and press Enter, or

  3. Convert it to a file URL in Chrome’s omnibox, for example file:///D:/Reports/2026/summary.xlsx (swap backslashes for /).

  4. For Office formats, let the OS open Excel/WPS after Chrome/Explorer resolves the path—or open the folder and double-click the file.

Plain text Windows path converted to a file:/// URL for Chrome  
Plain text Windows path converted to a file:/// URL for Chrome

There is no built-in Chrome “right-click this random text and open as a file” command. Selection + copy + Explorer / file:/// is the reliable path; some extensions add convenience, but verify they only act on your click.

For developers: open and save local files the compliant way

If you are building a web app that needs to read or write user files, do not teach users to disable Chrome’s file:// protections. Use the modern File System Access API (supported in Chromium browsers with progressive enhancement).

  • Open: call a file picker (for example showOpenFilePicker()) after a user gesture such as a button click.

  • Read: work with the returned file handles in memory; show clear UI for what will be uploaded or processed.

  • Save: request a writable handle / save dialog so the user confirms where changes go.

  • Permissions: expect Chrome prompts such as allowing the site to view or edit files the user selected—not blanket disk access.

Chrome File System Access API permission prompt for opening a user-selected file  
Chrome File System Access API permission prompt for opening a user-selected file

This matches what security-conscious users want: the site only touches files they pick. Fallback for older browsers: classic upload, then download a new copy for “save.”

Another option: open Office paths in WPS after Chrome gets you there

Chrome is a strong viewer for PDFs, HTML, and images, but it is not a full Word/Excel editor. When the “file” in your note is .docx, .xlsx, or .pptx, the practical finish line is a spreadsheet/writer app—especially if you bounce between Windows and Mac and do not want every handoff stuck inside Microsoft 365.

100% secure

WPS Office lets you open everyday Excel-compatible workbooks in Spreadsheets (and related Office files in Writer/Presentation) across desktop and mobile, with a free tier for everyday editing. Use Chrome to locate or download the file, then open the real workbook/document in WPS when you need to edit, not just preview.

WPS Spreadsheets opening a spreadsheet workbook in the real desktop app  
WPS Spreadsheets opening a spreadsheet workbook in the real desktop app

FAQ

How do I open a local file in Google Chrome?

Press Ctrl + O (Mac: ⌘ + O), pick the file, or drag it onto a tab. You can also type a file:/// path in the address bar.

Why don’t file:// links work when I click them on a website?

Chrome blocks web pages from opening local filesystem URLs to stop sites from reaching your disk without an explicit open action from you.

Do I need --allow-file-access-from-files to open local files?

No for normal PDF/HTML preview. That flag is a developer testing option for local HTML loading other local files. Prefer Ctrl+O or a localhost server for daily work.

How do I enable Allow access to file URLs for a Chrome extension?

Go to chrome://extensions → Details on the extension → enable Allow access to file URLs.

How can I open a plain text path like D:\folder\file.xlsx?

Copy the path into File Explorer, or convert it to file:///D:/folder/file.xlsx in Chrome. Office files will usually open in your spreadsheet/word app.

What is the File System Access API in Chrome?

It is a browser API that lets web apps open and save user-selected files through system pickers and permission prompts, instead of using blocked file:// hyperlinks.

Summary

Chrome can open local files when you start the action: Ctrl + O, drag-and-drop, Open with, or a typed file:/// URL. It blocks webpage file:// links to protect your filesystem. For intranet workflows, enable a trusted extension’s Allow access to file URLs toggle; for local HTML testing, use a temporary flag or localhost—not a permanent insecure profile. Plain-text paths need copy/paste into Explorer or a file URL. Developers should use the File System Access API with explicit pickers. When the target is an Office document, finish in WPS Spreadsheets after Chrome helps you find the file.

Free Office Download
  • Use Word, Excel, and PPT for FREE, No Ads.

  • Edit PDF files with the powerful PDF toolkit.

  • Microsoft-like interface. Easy to learn. 100% Compatibility.

  • Boost your productivity with WPS's abundant free Word, Excel, PPT, and CV templates.

100% secure


Algirdas Jasaitis

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.