---
name: "syd-hex"
section: "1"
platform: "linux"
package: "syd"
version: "3.59.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/syd-hex"
---

# syd-hex(1)

Hex-encode/decode the given file or standard input

## NAME

**syd-hex** - Hex-encode/decode the given file or standard input

## SYNOPSIS

**syd-hex** *\[-hdeflsC\]* *\<file\|-\>*

## DESCRIPTION

Given a file, hex-encode the file and print.

Given no positional arguments or "-" as argument, hex-encode standard input and print.

Use **-d** to hex-decode rather than encode.

Use **-s** with **-d** to hex-decode data with newline-delimited chunks.

Use **-C** with **-s** to warn and continue in case of read or encoding errors.

Use **-f** to force print decoded hex to TTY (insecure). By default, decoded hex output is *not* written to standard output if it's attached to a TTY.

Use **-l** \<human-size\> to exit after size bytes are read.

Use **-l** \<line-count\> with **-s** to exit after count lines are read.

## OPTIONS

| | |
| --- | --- |
| **-h** | Display help. |
| **-d** | Hex-decode. |
| **-e** | Hex-encode (default). |
| **-f**, **--force-tty** | Force output to TTY (insecure). |
| **-l** *\<human-size\>* | Exit after size bytes are read. |
| **-l** *\<line-count\>* | Exit after count lines are read in stream mode. |
| **-s**, **--stream** | Enable stream mode with **-d** when data is hex-decoded with newline-delimited chunks. |
| **-C**, **--continue-on-failure** | Continue in case of read or encoding errors in stream mode. |

## SEE ALSO

[*syd*(1)](/syd/1.md), [*syd*(2)](/syd/2.md), [*syd*(5)](/syd/5.md), [*tty*(1)](/tty/1.md)

**syd** homepage: https://sydbox.exherbo.org/

## AUTHORS

Maintained by Ali Polatel. Up-to-date sources can be found at https://gitlab.exherbo.org/sydbox/sydbox.git and on Radicle at rad:z38HCnbmcDegA2BMxuPaPRPMdp6wF. Bugs/patches can be submitted to https://gitlab.exherbo.org/groups/sydbox/-/issues. Discuss in #sydbox on Libera Chat or in #sydbox:mailstation.de on Matrix.
