# toBase64URL

Description: toBase64URL cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Utilities/to-base64-url.mdx

### Signature

```solidity
function toBase64URL(bytes calldata data) external pure returns (string memory);
function toBase64URL(
  string calldata data
) external pure returns (string memory);
```

### Description

Encodes a `bytes` or `string` value to a base64url string.
