You can export as below using azure CLI
Policy export definition
$policies = az policy definition list | Out-File 'c:\xxxx\policy_definition.json'
from the above file you can also pick type of policies you want
$policies = 'c:\xxxx\policy_definition.json" | ConvertFrom-Json
$final = ($policies | Where-Object {$_.policyType -eq 'Custom'}) | ConvertTo-Json
$final | Out-File ''c:\xxxx\custompolicy_definations.json'