---
title: JWT Decoder
description: Decode JWT tokens and inspect header and payload.
---

# JWT Decoder

Decode a JWT token and display the header and payload. Does not verify signatures.

## Commands

```bash
devv jwt decode <token>
echo "$JWT_TOKEN" | devv jwt decode
```

## Examples

```bash
# Decode a token
devv jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

# Decode from environment variable
echo "$AUTH_TOKEN" | devv jwt decode

# Decode from clipboard (macOS)
pbpaste | devv jwt decode
```

## Output

```bash
$ devv jwt decode eyJhbGciOiJIUzI1NiIs...
Header:
{
  "alg": "HS256",
  "typ": "JWT"
}

Payload:
{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}

Signature: SflKxwRJSMeKKF2QT4fw...
```

## Pipeline Usage

| Pipeline ID | Description |
|-------------|-------------|
| `jwt-decoder` | Decode JWT, output header + payload as JSON |

```bash
devv pipe exec "jwt-decoder" "eyJhbGciOiJIUzI1NiIs..."
```

### Behavior

Transforms input — outputs the decoded header and payload as formatted JSON.
