Home Explore Blog CI



nushell

commands/docs/decode_base64.md
436928e1dc3105c84665d0c7f3669d02fa73e8cf73200ada00000003000004fe
---
title: decode base64
categories: |
  formats
version: 0.104.0
formats: |
  Decode a Base64 value.
usage: |
  Decode a Base64 value.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `decode base64` for [formats](/commands/categories/formats.md)

<div class='command-title'>Decode a Base64 value.</div>

## Signature

```> decode base64 {flags} ```

## Flags

 -  `--url`: Decode the URL-safe Base64 version.
 -  `--nopad`: Reject padding.


## Input/output types:

| input  | output |
| ------ | ------ |
| string | binary |
## Examples

Decode a Base64 string
```nu
> "U29tZSBEYXRh" | decode base64 | decode

```

Decode arbitrary data
```nu
> "/w==" | decode base64
Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii
00000000:   ff                                                   ×

```

Decode a URL-safe Base64 string
```nu
> "_w==" | decode base64 --url
Length: 1 (0x1) bytes | printable whitespace ascii_other non_ascii
00000000:   ff                                                   ×

```

## Notes
The default alphabet is taken from RFC 4648, section 4.  A URL-safe version is available.

Note this command will collect stream input.

Chunks
9c6d3830 (1st chunk of `commands/docs/decode_base64.md`)
Title: decode base64
Summary
Decodes a Base64 encoded string into binary data. It supports standard Base64 and URL-safe Base64 decoding. It also has an option to reject padding. The command accepts a string as input and outputs binary data.