---
title: "BASE64_DECODE"
description: "SQL-funktionen BASE64_DECODE konverterar ett base64-kodat v\u00E4rde tillbaka till bin\u00E4robjektet s\u00E5 som det definieras i RFC 4648."
language: sv
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/sv/docs/invantive-universalsql/grammar/sql-functions/base64-decode
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/base64-decode
updated: 2026-12-04T13:21:21Z
license: https://documentation.invantive.eu/sv/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> BASE64_DECODE[BASE64_DECODE]:::quoted
    BASE64_DECODE --> End((END))
```

## Syfte
SQL-funktionen `BASE64_DECODE` konverterar ett base64-kodat värde tillbaka till binärobjektet så som det definieras i [RFC 4648](https://www.rfc-editor.org/rfc/rfc4648).

Se även [[BASE64_ENCODE]].

Parametrar:
- Indata (`varchar2`): värdet som ska konverteras tillbaka till originalet.

Returnerar: indata avkodad tillbaka till det binära värdet som `blob`.

## Exempel
`BASE64_DECODE` mappar texten `aGk=` till ett binärobjekt och sedan till en text i 7-bitars ASCII-teckenuppsättning:
```sql
select blob_to_text(base64_decode('aGk='), 'ASCII')

--------
hi
```
`BASE64_DECODE` mappar en base64-kodad text till ett binärobjekt och sedan till en text med `TO_CHAR`:
```sql
select to_char(base64_decode('VGhpcyBpcyBhIGJhc2U2NCB0ZXN0'))

----------------------
This is a base64 test
```

