jq Cheat Sheet/Base64-decode string

Decode a base64 string back to plain text.

Section: Strings and Formatting

Base64-decode string

bash
bash
echo '"aGVsbG8gd29ybGQ="' | jq -r '@base64d'
Explanation

Input must be a JSON string containing base64 data.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Strings and Formatting
Base64-encode string
Encode a string as base64.
OpenIn sheetbashsame section
Join array into string
Join array items with a delimiter.
OpenIn sheetbashsame section
Split string into array
Break a string apart using a delimiter.
OpenIn sheetbashsame section
String interpolation
Build human-readable text from JSON values.
OpenIn sheetbashsame section
Convert array to CSV row
Output a JSON array as CSV.
OpenIn sheetbashsame section
Convert array to TSV row
Output a JSON array as tab-separated text.
OpenIn sheetbashsame section