Add Name & Date on Photo

Prepare your passport photos for UPSC, SSC, and other competitive exams instantly.

100% Private: Your photo is processed locally in your browser and never uploaded to any server.

Preview will appear here

Why Do You Need Name and Date on Photos?

For many government competitive exams in India, such as SSC (Staff Selection Commission), UPSC (Union Public Service Commission), IBPS, and RRB (Railway Recruitment Board), uploading a passport-size photograph with the candidate's name and the date the photo was taken (DOP) is mandatory.

Failing to adhere to this specific format often leads to the rejection of the application form. This tool simplifies the process by allowing you to add these details digitally without needing expensive photo editing software like Photoshop.

Key Features of This Tool

Difference Between DOP and DOB

DOP (Date of Photo): This indicates when the photograph was clicked. Most exams require the photo to be not older than 3 months from the date of notification.

DOB (Date of Birth): This is your birth date. Some specific forms might ask for this, but DOP is more common for identification purposes.

How to Use This Tool?

  1. Click on "Upload Photo" and select your passport-size image.
  2. Enter your full name in the text box.
  3. Select the date from the calendar.
  4. Choose whether you want "DOP", "DOB", or just the date printed.
  5. The tool automatically places a white strip at the bottom with black text.
  6. Click "Download Photo" to save the edited image.

Photo Specifications for Major Exams

const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); const img = new Image(); // Load Image document.getElementById("imageInput").addEventListener("change", e => { if (e.target.files && e.target.files[0]) { img.src = URL.createObjectURL(e.target.files[0]); img.onload = () => { // Set canvas dimensions to match image canvas.width = img.width; canvas.height = img.height; draw(); }; } }); // Event Listeners for Inputs ["name", "date", "dateType"].forEach(id => { document.getElementById(id).addEventListener("input", draw); }); // Format Date Function (DD-MM-YYYY) function formatDate(value) { if (!value) return ""; let d = new Date(value); let formatted = String(d.getDate()).padStart(2, "0") + "-" + String(d.getMonth() + 1).padStart(2, "0") + "-" + d.getFullYear(); let type = document.getElementById("dateType").value; if (type === "NONE") return formatted; return type + ": " + formatted; } // Draw Function function draw() { if (!img.src) return; // 1. Draw Original Image ctx.drawImage(img, 0, 0); // 2. Settings for Text Strip const stripHeight = img.height * 0.15; // 15% of image height const fontSize = img.height * 0.06; // 6% of image height const nameText = document.getElementById("name").value.toUpperCase(); const dateText = formatDate(document.getElementById("date").value); // 3. Draw White Background Strip ctx.fillStyle = "#ffffff"; ctx.fillRect(0, canvas.height - stripHeight, canvas.width, stripHeight); // 4. Draw Text ctx.fillStyle = "#000000"; ctx.textAlign = "center"; ctx.font = `bold ${fontSize}px Arial`; // Positioning logic if (nameText && dateText) { // Both Name and Date ctx.fillText(nameText, canvas.width / 2, canvas.height - (stripHeight * 0.6)); ctx.fillText(dateText, canvas.width / 2, canvas.height - (stripHeight * 0.15)); } else if (nameText) { // Only Name ctx.fillText(nameText, canvas.width / 2, canvas.height - (stripHeight * 0.35)); } else if (dateText) { // Only Date ctx.fillText(dateText, canvas.width / 2, canvas.height - (stripHeight * 0.35)); } } // Download Function function downloadImage() { if (!img.src) { alert("Please upload an image first."); return; } const quality = parseFloat(document.getElementById("quality").value); const link = document.createElement("a"); link.href = canvas.toDataURL("image/jpeg", quality); link.download = "photo-with-date.jpg"; link.click(); }