> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function decode_bytes_from_fields

Module: `noir_aztec::utils::conversion::bytes_as_fields`

```rust
pub fn decode_bytes_from_fields<let N: u32>(
    fields: BoundedVec<Field, N>,
) -> BoundedVec<u8, N * 31>
```

Decodes fields back into bytes.

Inverse of [`encode_bytes_as_fields`](/aztec-nr-api/v6.0.0/noir_aztec/utils/conversion/bytes_as_fields/fn.encode_bytes_as_fields.md). Each input `Field` must fit in 248 bits; `Field::to_be_bytes::<31>()` fails the proof otherwise.
