Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

decode base64 for formats

Decode a Base64 value.

Signature

> decode base64 {flags}

Flags

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

Input/output types:

inputoutput
stringbinary

Examples

Decode a Base64 string

> "U29tZSBEYXRh" | decode base64 | decode

Decode arbitrary data

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

Decode a URL-safe Base64 string

> "_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.