---
name: base-conv
description: Encoding/decoding swiss army for any text. Encode and decode base64 (standard, urlsafe, no-padding), base32, base16/hex, URL percent-encoding, HTML entities, ROT13, Caesar shift, binary, JWT decode (no verify), unicode escape. Auto-detect mode that guesses the encoding of an input string. Pure stdlib. Use when the user asks to base64 encode / decode, "url-encode this", "what's this hex", JWT decode, "decode this string", "what encoding is this", or any small encoding/decoding task.
---


# base-conv

## Encode

```bash
python3 ~/.claude/skills/base-conv/scripts/conv.py encode --mode base64 "hello world"
# aGVsbG8gd29ybGQ=

python3 ~/.claude/skills/base-conv/scripts/conv.py encode --mode url "name=jane doe&age=30"
python3 ~/.claude/skills/base-conv/scripts/conv.py encode --mode hex "lol"
python3 ~/.claude/skills/base-conv/scripts/conv.py encode --mode binary "hi"
python3 ~/.claude/skills/base-conv/scripts/conv.py encode --mode rot13 "tor sale"
```

## Decode

```bash
python3 ~/.claude/skills/base-conv/scripts/conv.py decode --mode base64 "aGVsbG8="
python3 ~/.claude/skills/base-conv/scripts/conv.py decode --mode hex "6c6f6c"
python3 ~/.claude/skills/base-conv/scripts/conv.py decode --mode url "name%3Djane%20doe"
```

## Auto-detect

```bash
python3 ~/.claude/skills/base-conv/scripts/conv.py auto "aGVsbG8gd29ybGQ="
# detected: base64 → "hello world"

python3 ~/.claude/skills/base-conv/scripts/conv.py auto "%48%65%6C%6C%6F"
# detected: url → "Hello"
```

## JWT decode (no signature verify)

```bash
python3 ~/.claude/skills/base-conv/scripts/conv.py jwt eyJhbGc...
# header + payload pretty-printed JSON
```

## Read from stdin / file

```bash
echo "hello" | python3 ~/.claude/skills/base-conv/scripts/conv.py encode --mode base64 --stdin
python3 ~/.claude/skills/base-conv/scripts/conv.py encode --mode base64 --file image.png --output image.b64
```

## Modes

- `base64` — standard, padded
- `base64url` — URL-safe alphabet, no padding
- `base32`
- `base16` / `hex`
- `url` — RFC 3986 percent-encoding
- `html` — HTML entities (`&amp;` etc)
- `binary` — `01100001 01100010` style
- `rot13`
- `caesar` (with `--shift N`)
- `unicode` — `A` form
- `morse`

## Flags

- `encode` / `decode` / `auto` / `jwt` — subcommand
- `--mode` — encoding name
- `--shift` — Caesar offset (default 13)
- `--stdin` — read input from stdin
- `--file` — read input from file (binary-safe for base64/hex)
- `--output` — write to file instead of stdout
- positional: input string (if not using --stdin or --file)

## Pairs well with

- `regex-build` — encode tricky strings before testing patterns
- `dot-vault` — base64-encode raw bytes for safer storage
