# Registration.serializeOptions

Serializes credential creation options into a JSON-serializable format, converting `BufferSource` fields to base64url strings.

## Imports

:::code-group
```ts [Named]
import { Registration } from 'ox/webauthn'
```

```ts [Entrypoint]
import * as Registration from 'ox/webauthn/Registration'
```
:::

## Examples

```ts twoslash
import { Registration } from 'ox/webauthn'

const options = Registration.getOptions({ name: 'Example' })

const serialized = Registration.serializeOptions(options) // [!code focus]

// `serialized` is JSON-serializable — send it to a server, store it, etc.
const json = JSON.stringify(serialized)
```

## Definition

```ts
function serializeOptions(
  options: Types.CredentialCreationOptions,
): Types.CredentialCreationOptions<true>
```

**Source:** [src/webauthn/Registration.ts](https://github.com/wevm/ox/blob/main/src/webauthn/Registration.ts#L367)

## Parameters

### options

* **Type:** `Types.CredentialCreationOptions`

The credential creation options to serialize.

## Return Type

The serialized credential creation options.

`Types.CredentialCreationOptions<true>`
