Base64 Decode Base64 Encode
More Tools
Other tools: Base64 Image Decoder | Base64 Image Encoder | Url Encoder | Url Decoder

Ruby Base64.decode64()

Decode an input String using Base64.

Function

Base64.decode64(str)

Parameters

str - The String to be decoded

Return value

Returns the Base64-decoded version of str. This method complies with RFC 2045. Characters outside the base alphabet are ignored.

Example
require "base64"

encoded_string = 'YmFzZTY0IGVuY29kZWQgc3RyaW5n'
decoded_string = Base64.decode64(encoded_string)
Github

https://github.com/base64decode/examples/blob/master/base64decode.rb