A command-line URL encoder/decoder.
- Encode or decode percent-encoded URLs
- Read from a file or stdin, write to a file or stdout
- Processes input line-by-line
- Single static binary — no runtime dependencies
cargo install urlendecgit clone https://github.com/arcaartem/urlendec.git
cd urlendec
cargo build --releaseThe binary is placed at target/release/urlendec.
Download a binary for your platform from the releases page:
- macOS Intel (
x86_64-apple-darwin) - macOS Apple Silicon (
aarch64-apple-darwin) - Linux musl static binary (
x86_64-unknown-linux-musl)
Encode a string:
$ urlendec -s "Hello, world!"
Hello%2C%20world%21Decode a string:
$ urlendec -d -s "Hello%2C%20world%21"
Hello, world!Encode from stdin:
$ echo "Hello, world!" | urlendec
Hello%2C%20world%21Encode a file and write to another file:
urlendec -i input.txt -o output.txtDecode a file to stdout:
urlendec -d -i encoded.txt| Flag | Description |
|---|---|
-d, --decode |
Decode input instead of encoding (default is encode) |
-s, --string <STRING> |
Encode/decode a literal string (mutually exclusive with -i) |
-i, --input-file <PATH> |
Read line-by-line from a file (default: - = stdin) |
-o, --output-file <PATH> |
Write output to a file (default: - = stdout) |
-h, --help |
Print help information |
-V, --version |
Print version information |
cargo build --release # release build
cargo test # run all tests
cargo clippy # lintContributions are welcome. See CONTRIBUTING.md for setup instructions, style guidelines, and the PR process.
This project is licensed under the MIT License. See LICENSE for details.