SERP Snippet Optimizer
0 / 60 characters
0 / 160 characters
Google Desktop Preview
https://www.yoursite.com › blog › post
Your Page Title Here
Your meta description will appear here. Make sure to include your target keywords and a strong call to action to improve your organic CTR.
function updatePreview() {
var title = document.getElementById('seoTitleInput').value;
var desc = document.getElementById('seoDescInput').value;
var pTitle = document.getElementById('previewTitle');
var pDesc = document.getElementById('previewDesc');
var tCount = document.getElementById('titleCount');
var dCount = document.getElementById('descCount');
var tStatus = document.getElementById('titleStatus');
var dStatus = document.getElementById('descStatus');
pTitle.innerText = title || "Your Page Title Here";
pDesc.innerText = desc || "Your meta description will appear here. Make sure to include your target keywords and a strong call to action to improve your organic CTR.";
tCount.innerText = title.length + " / 60 characters";
dCount.innerText = desc.length + " / 160 characters";
if (title.length > 60) {
tCount.style.color = "#d93025";
tStatus.innerText = "Too Long";
tStatus.style.color = "#d93025";
} else if (title.length > 40) {
tCount.style.color = "#188038";
tStatus.innerText = "Good";
tStatus.style.color = "#188038";
} else {
tCount.style.color = "#666";
tStatus.innerText = "";
}
if (desc.length > 160) {
dCount.style.color = "#d93025";
dStatus.innerText = "Too Long";
dStatus.style.color = "#d93025";
} else if (desc.length > 120) {
dCount.style.color = "#188038";
dStatus.innerText = "Good";
dStatus.style.color = "#188038";
} else {
dCount.style.color = "#666";
dStatus.innerText = "";
}
}
function clearFields() {
document.getElementById('seoTitleInput').value = ";
document.getElementById('seoDescInput').value = ";
updatePreview();
}
function copyToClipboard() {
var desc = document.getElementById('seoDescInput');
desc.select();
document.execCommand('copy');
alert('Meta description copied to clipboard!');
}