Path.FileURLToFilePath
----------------------

Converts a file URL to a local file path.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Path](component_Path.md) | [5.0](newinversion50.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Path.FileURLToFilePath"; URL ) 

**MBS**( **"Path.FileURLToFilePath";** /\* Converts a file URL to a local file path. \*/  
**$URL**) /\* The file URL to convert.e.g. "file://localhost/Users/cs/Desktop/test.html" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| URL | The file URL to convert. | "file://localhost/Users/cs/Desktop/test.html" |

### Result

Returns path or error.

### Description

Converts a file URL to a local file path.  
### Examples

Converts a path URL:

 MBS ( "Path.FileURLToFilePath"; "file://localhost/Users/cs/Desktop/test.html" )  
<small>  
Example result: "/Users/cs/Desktop/test.html"</small>Converts file URL on Windows to path:

 MBS ( "Path.FileURLToFilePath"; "file://C:/Users/Christian/Desktop/test.html")  
<small>  
Example result: "/Users/Christian/Desktop/test.html"</small>### Blog Entries

- [MBS Plugin Advent calendar: 7 - Paths](https://www.mbsplugins.de/archive/2023-12-07/MBS_Plugin_Advent_calendar_7_-/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.0pr9](https://www.mbsplugins.de/archive/2015-02-01/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 30th January 2015 , last changed 25th February 2026

  
[Path.FilePathToFileURL](PathFilePathToFileURL.md) - [Path.LastPathComponent](PathLastPathComponent.md)

[HTML Version](PathFileURLToFilePath.shtml)