---
name: "rax"
section: "1"
platform: "linux"
package: "radare-common"
version: "1:1.5.2-2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/rax"
---

# rax(1)

radare base converter

## NAME

**rax** – radare base converter

## SYNOPSIS

**rax** \[**-e**\] \[**-s**\] \[**-h**\] \[-\|value\] \[...\]

## DESCRIPTION

This command is part of the radare project.

This command allows you to convert values between positive and negative integer, float octal, binary and hexadecimal values.

With no arguments, rax reads values from stdin. You can pass one or more values as arguments, and swap endiannes of the output with the '-e' flag.

Using '-' as argument rax will read binary data from stdin and print out the hex pairs to stdout.

  $ rax -33 -e -33\
   0xffffffdf\
   0xdfffffff

The '-s' flag converts radare into a hexpair-to-binary converter, so you can do 'unpack' hexpair encoded strings easily.

  $ rax -s 41 42 43\
   ABC

It is very useful tool for scripting, so you can read floating point values, or get the integer offset of a jump or a stack delta when analyzing programs.

Available variable types are:

  integer          10\
   zeropadding     010\
   float           10f\
   hexadecimal    0x10\
   hex to float   Fx10\
   oct to hex      023 (or 23o)\
   hex to oct     Ox20 (note 'O' is not zero)\
   bin to hex    1101b\
   hex to bin     Bx63

Available flags are:

- **-e**

  Swap endian.

- **-h**

  Show usage help message.

## SEE ALSO

[radiff(1)](/radiff/1.md), [radare(1)](/radare/1.md), [radarerc(5)](/radarerc/5.md), [rabin(1)](/rabin/1.md), hasher(1), [rsc(1)](/rsc/1.md), [rasc(1)](/rasc/1.md), [rasm(1)](/rasm/1.md), [rfile(1)](/rfile/1.md), [xrefs(1)](/xrefs/1.md)

## AUTHORS

pancake \<pancake@youterm.com\>
