# Convert a file URL to an absolute path

> Convert a `file://` URL into an absolute filesystem path with `Bun.fileURLToPath()`.

Use `Bun.fileURLToPath()` to convert a `file://` URL to an absolute path.

```ts
Bun.fileURLToPath("file:///path/to/file.txt");
// => "/path/to/file.txt"
```

---

See [Utils](https://bun.aphrody.app/docs/runtime/utils).
