Text.DecodeFromBase64URL
------------------------

Decode a base 64 URL string.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Text](component_Text.md) | [7.5](newinversion75.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Text.DecodeFromBase64URL"; Text { ; Encoding } ) 

**MBS**( **"Text.DecodeFromBase64URL";** /\* Decode a base 64 URL string. \*/  
**$Text**; /\* The text to process.e.g. "R3LDvMOfIEdvdHQuIFRlc3Qg4pi6" \*/   
**$Encoding**) /\* Optional; The text encoding for result.   
Default is native. This function can also handle UTF-16 as well as UTF-16LE and UTF-16BE for little/big endian byte order.e.g. "UTF-8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | The text to process. | "R3LDvMOfIEdvdHQuIFRlc3Qg4pi6" |  |
| Encoding | The text encoding for result.    Default is native. This function can also handle UTF-16 as well as UTF-16LE and UTF-16BE for little/big endian byte order. | "UTF-8" | Optional |

### Result

Returns decoded text.

### Description

Decode a base 64 URL string.  
This is for text only. Data encoded as base64 would probably be truncated as FileMaker texts do not contain NULL bytes.  
### Examples

Decode Base64 as UTF-8:

 MBS ( "[Text.DecodeFromBase64](TextDecodeFromBase64.md)"; "SGVsbG8gV29ybGQ"; "utf8" )  
Convert from Base64URL to Base64:

 MBS ( "[Text.DecodeFromBase64](TextDecodeFromBase64.md)"; "SGVsbG8gV29ybGQ"; "base64" )  
<small>  
Example result: SGVsbG8gV29ybGQ=</small>### See also

- [Text.DecodeFromBase64](TextDecodeFromBase64.md)
- [Text.DecodeHexFromBase64](TextDecodeHexFromBase64.md)
- [Text.EncodeToBase64URL](TextEncodeToBase64URL.md)

### Example Databases

- [Encryption and Hash/JWT RS256](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Encryption%20and%20Hash/JWT%20RS256.shtml#2ScriptAnchor_)

### Blog Entries

- [Comparing Base Elements Plugin to MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2017-10-24/Comparing_Base_Elements_Plugin/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 21st October 2017 , last changed 26th November 2024

  
[Text.DecodeFromBase64](TextDecodeFromBase64.md) - [Text.DecodeFromBytes](TextDecodeFromBytes.md)

[HTML Version](TextDecodeFromBase64URL.shtml)