od
Inspect raw binary content by dumping bytes as hexadecimal, octal, or decimal rows. Analyze file structure and encoding details.
Instructions
Dump input bytes as structured rows in hexadecimal, octal, or decimal format. Read-only, no side effects. Returns JSON with formatted dump by default; use --raw for traditional octal display. Use to inspect raw binary content. Not for plain text viewing — use 'cat'. See also 'cat'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write dump rows without a JSON envelope. | |
| paths | No | Files to dump, or '-' for stdin. Defaults to stdin. | |
| format | No | Byte rendering format. | hex |
| offset | No | Start offset in bytes. | |
| encoding | No | Output encoding (default: utf-8). Use 'auto' for BOM/autodetection. | utf-8 |
| max_bytes | No | Maximum bytes to dump. | |
| show_encoding | No | Include encoding detection metadata in JSON result. | |
| bytes_per_line | No | Bytes per output row. | |
| encoding_errors | No | How to handle encoding errors (default: replace). | replace |
| encoding_profile | No | Locale-aware encoding fallback profile for auto-detection. |