Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fstring%2Fdecodebase64.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fstring%2Fdecodebase64.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `decodeBase64`

## Description

Decodes a Base64-encoded string into its original value.

## Syntax

Like many functions in DataPrime, `decodeBase64` supports<!-- --> [two notations](https://docs-docusaurus.kinsta.page/dataprime/language-reference/functions-reference/.md),<!-- --> **function** and **method**. These interchangeable forms allow flexibility in how you structure expressions.

* Function notation
* Method notation

```
decodeBase64(value: string): string
```

```
(value: string).decodeBase64(): string
```

## Arguments

| Name    | Type     | Required | Description                         |
| ------- | -------- | -------- | ----------------------------------- |
| `value` | `string` | **true** | The Base64-encoded string to decode |

## Example

**Decode a Base64-encoded URL**

Consider the following document:

```
{

    "path": "/home",

    "domain": "coralogix.com",

    "full_url_encoded": "aHR0cHM6Ly9jb3JhbG9naXguY29tL2hvbWU=" 

}
```

Use `decodeBase64` to recover the original URL:

### Example query

* Function notation
* Method notation

```
create full_url from decodeBase64(full_url_encoded)
```

```
create full_url from full_url_encoded.decodeBase64()
```

### Example output

```
{

    "path": "/home",

    "domain": "coralogix.com",

    "full_url_encoded": "aHR0cHM6Ly9jb3JhbG9naXguY29tL2hvbWU=",

    "full_url": "https://coralogix.com/home"

}
```
