rembrembdocs

Skip to main content

Bun home pagelight logodark logo

[Runtime

](../../../index.md)[Package Manager

](../../../pm/cli/install/index.md)[Bundler

](../../../bundler/index.md)[Test Runner

](../../../test/index.md)[Guides

](../../index.md)[Reference

](https://bun.com/reference)[Blog

](https://bun.com/blog)[Feedback

](../../../feedback/index.md)

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

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

See Docs > API > Utils for more useful utilities.

Was this page helpful?

Suggest editsRaise issue

[

Sleep for a fixed number of milliseconds

Previous

](../sleep/index.md)[

Convert an absolute path to a file URL

Next

](../path-to-file-url/index.md)