Decode a base64 encoded string - REST API Reference

You can decode base64 encoded strings using REST API. In this section we will describe each option to pass the base64 encoded text to our Base64 decoder.


Decode base64 encoded string as "text/plain"

To decode some textual data encoded as a base64 string, please set the "content-type" header to "text/plain". An example request would look like this:

[HTTP POST] https://api.thebase64.com/decode?secret=your_secret
Content-Type: text/plain

VGhpcyBpcyBzb21lIHRleHQgdG8gYmUgZW5jb2RlZCBhcyBiYXNlNjQgc3RyaW5n

Request Payload

Your request body should contain base64 encoded string that you want to decode


Decode base64 encoded text using JSON

To decode a base64 encoded text using JSON, please set the "content-type" header to "application/json". An example request would look like this:

[HTTP POST] https://api.thebase64.com/decode?secret=your_secret
Content-Type: application/json
{
    "Data": "VGhpcyBpcyBzb21lIHRleHQgdG8gYmUgZW5jb2RlZCBhcyBiYXNlNjQgc3RyaW5n"
}

Request Payload

Data string
The base64 encoded text that you want to decode