---
title: "unbin function in Strata | Oplema"
description: "Convert a string of zeros and ones from binary representation into a BLOB value. Write it as unbin(value) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/unbin"
updated: "2026-11-04"
---

# unbin

Converts a value from binary representation to a blob.

Also available as from\_binary.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
unbin('0110')
```

### Result

```
'\x06'
```

The expression returns `BLOB`. Formula stores it as `VARCHAR` in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | \\x06 |

## Arguments and types

```
unbin(value)
```

**value**

Text

Supported signatures (1)

```
unbin(value: VARCHAR) → BLOB
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[unhex

Converts a value from hexadecimal representation to a blob.

](https://oplema.com/docs/strata/functions/unhex)[bin

Converts the string to binary representation.

](https://oplema.com/docs/strata/functions/bin)[format\_bytes

Convert a byte count to a readable size using units based on powers of 2, such as KiB, MiB and GiB. Also available as pg\_size\_pretty.

](https://oplema.com/docs/strata/functions/format-bytes)[from\_base64

Decode base64 text into binary data.

](https://oplema.com/docs/strata/functions/from-base64)

[Browse text](https://oplema.com/docs/strata/functions#text) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#unbinvalue)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
