For completeness, you should know how to go back. If you have an ISO and want to save space again, use:
chdman createcd -i "input.iso" -o "output.chd"
For BIN/CUE:
chdman createcd -i "input.cue" -o "output.chd"
This is why the CHD format is so popular in ROM sets like "Redump" or "TOSEC"—you can store a single CHD file instead of a BIN, CUE, SUB, and CCD file.
There is a persistent myth that converting CHD to ISO degrades quality. This is false. convert chd to iso
The CHD format is lossless. The compression works exactly like a ZIP file for a Word document. When you compress it, you save space. When you decompress it (convert to ISO), you get the original file back, byte-for-byte. If your CHD file was created from a verified "Redump" ISO, the resulting ISO will be an exact checksum match to the original.
if [[ $# -eq 0 ]]; then echo "Usage: $0 <chd_file(s)>" echo "Examples:" echo " $0 game.chd" echo " $0 .chd" echo " $0 /path/to/chds/.chd" exit 1 fi
First, it is important to understand why this conversion is necessary. An ISO file is a raw, sector-by-sector copy of an optical disc (CD, DVD, or BD). It is simple, widely supported, and can be mounted directly by modern operating systems or used by many emulators. For completeness, you should know how to go back
The CHD format, originally developed for the MAME (Multiple Arcade Machine Emulator) project, takes a different approach. It compresses the disc data using lossless algorithms, often reducing file sizes by 30-50% without sacrificing data integrity. CHD is ideal for long-term archiving and for emulators like MAME, RetroArch, and newer standalone emulators that support it directly. However, its specialized nature means many tools—such as older emulators, disc burning software, or operating system mounting utilities—cannot read CHD files. This is where conversion to ISO becomes necessary.
If chdman returns error: Cannot extract to ISO (multiple tracks/sessions), the file must be extracted to CUE/BIN instead:
chdman extract -i "mixed_mode.chd" -o "mixed_mode.cue" -ob "mixed_mode.bin"
After conversion, two checks are recommended: For BIN/CUE: chdman createcd -i "input
# Install required tools
# Ubuntu/Debian
sudo apt-get install chdman mame-tools
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
convert_chd()
local input_file="$1"
local output_file="$OUTPUT_DIR/$(basename "$input_file%.chd.iso")"
echo -e "$YELLOWConverting: $(basename "$input_file")$NC"
mkdir -p "$OUTPUT_DIR"
if "$CHDMAN" extract -i "$input_file" -o "$output_file"; then
echo -e "$GREEN✓ Success: $output_file$NC"
if [[ "$VERIFY" == "true" ]]; then
if file "$output_file"