---
description: Parses a hex string into bytes
---

## `parseBytes`

### Signature

```solidity
function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);
```

### Description

Parses a hex string into `bytes`.

### Parameters

| Parameter          | Type     | Description              |
|--------------------|----------|--------------------------|
| `stringifiedValue` | `string` | The hex string to parse  |

### Returns

| Type    | Description         |
|---------|---------------------|
| `bytes` | The parsed bytes    |

### Examples

```solidity [test/ParseBytes.t.sol]
string memory bytesAsString = "0x00000000000000000000000000000000";
bytes memory result = vm.parseBytes(bytesAsString);
// result = 0x00000000000000000000000000000000
```

### Related Cheatcodes

- [`toString`](/reference/cheatcodes/to-string) - Converts bytes to string
- [`parseBytes32`](/reference/cheatcodes/parse-bytes32) - Parses string to bytes32
