Unix to Windows Path Converter
Convert file paths between Windows (backslashes) and Unix (forward slashes) instantly. Supports WSL (/mnt/c), Git Bash (/c/), and Cygwin formats.
Path Converter
Auto-detects and converts between Unix/Linux and Windows path formats.
Recent Conversions
- No history yet.
About
This tool eliminates the friction of moving file paths between operating systems. Whether you are pasting a Windows path into a WSL (Windows Subsystem for Linux) terminal or configuring a JSON config file that requires escaped backslashes, this utility handles the transformation logic instantly.
We use strict regular expression parsing to identify drive letters (C:), network shares (UNC paths), and root directories. The converter supports multiple Unix "flavors" including standard Git Bash, WSL, and Cygwin standards.
Note: While Windows API now accepts forward slashes in many contexts, mostly command-line tools (CMD) and legacy software still strictly require backslashes (\). Conversely, Linux environments interpret backslashes as escape characters, making conversion mandatory.
Formulas
The core logic maps the path separator and the root identifier based on the target environment.
Windows to Unix Transformation:
T(p) = p.replace(\, /)
If path starts with Drive: → Prepend Prefix + Drive
Where Prefix depends on the selected flavor:
Reference Data
| OS Environment | Path Structure Example | Root Definition |
|---|---|---|
| Windows (Standard) | C:\Users\Docs | Drive Letter (C:) |
| Git Bash (MinGW) | /c/Users/Docs | Virtual Root (/c/) |
| WSL (Ubuntu/Debian) | /mnt/c/Users/Docs | Mount Point (/mnt/) |
| Cygwin | /cygdrive/c/Users | Cygdrive Prefix |
| Network (UNC) | \\Server\Share | Double Backslash |