Change P12 certificate passwords programmatically via REST API
The P12 Password Changer API allows you to change passwords for .p12 certificate files programmatically.
https://tools.sidelix.vip/p12-password-changer/api/
/api/
Change password for a P12 certificate file
| Parameter | Type | Required | Description |
|---|---|---|---|
p12_file |
File | Required | The .p12 certificate file |
old_password |
String | Optional | Current password (empty if none) |
new_password |
String | Required | New password to set |
{
"success": true,
"error": null,
"data": {
"message": "Password changed successfully",
"download_url": "https://tools.sidelix.vip/p12-password-changer/download.php?file=...",
"password": "mynewpassword",
"filename": "modified_certificate.p12",
"warning": "Download URL is valid for one-time use only. File will be deleted after first download."
}
}
| Field | Description |
|---|---|
download_url |
Direct download link to a ZIP file containing the modified certificate and a README with password info. One-time use only - file is deleted after first download. |
password |
The new password that was set on the certificate |
filename |
Suggested filename for saving the certificate |
warning |
Important notice about download URL being single-use only |
{
"success": false,
"error": "Incorrect old password",
"data": null
}
curl -X POST https://tools.sidelix.vip/p12-password-changer/api/ \
-F "[email protected]" \
-F "old_password=oldpass123" \
-F "new_password=newpass456"
import requests
url = "https://tools.sidelix.vip/p12-password-changer/api/"
with open("certificate.p12", "rb") as f:
files = {"p12_file": f}
data = {
"old_password": "oldpass123",
"new_password": "newpass456"
}
response = requests.post(url, files=files, data=data)
result = response.json()
if result["success"]:
download_url = result["data"]["download_url"]
print(f"Success! New password: {result['data']['password']}")
print(f"Download URL: {download_url}")
print(f"Warning: {result['data']['warning']}")
# Download the ZIP file
zip_response = requests.get(download_url)
with open("modified_certificate.zip", "wb") as out:
out.write(zip_response.content)
print("Downloaded modified_certificate.zip")
else:
print(f"Error: {result['error']}")
const formData = new FormData();
formData.append('p12_file', fileInput.files[0]);
formData.append('old_password', 'oldpass123');
formData.append('new_password', 'newpass456');
fetch('https://tools.sidelix.vip/p12-password-changer/api/', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
console.log('Success! New password:', data.data.password);
console.log('Warning:', data.data.warning);
// Redirect to download URL or open in new tab
window.open(data.data.download_url, '_blank');
// Or trigger automatic download
// window.location.href = data.data.download_url;
} else {
console.error('Error:', data.error);
}
});
No file uploaded or upload error occurredNew password is requiredOnly .p12 files are allowedIncorrect old passwordFailed to change password