Most people use these terms interchangeably, but they mean very different things in law and cryptography.
An electronic signature is any electronic indication of intent to sign — a typed name, a drawn signature, a click on 'I agree'. A digital signature is a specific cryptographic mechanism that uses a private key to mathematically bind a person to a document.
Every digital signature is an electronic signature. Not every electronic signature is a digital signature.
1. Hash the document with SHA-256.
2. Encrypt the hash with the signer's private key (held on a smart card, HSM, or secure enclave).
3. Anyone with the signer's public key (from a trusted certificate authority) can decrypt the hash and confirm the document hasn't been altered and that only the holder of the private key could have produced this signature.
Most B2B and B2C contracts: an electronic signature is enough.
Government filings, regulated financial documents, qualified electronic signatures under eIDAS, India's DSC regime: digital signature with an accredited certificate is required.
DocFila Business supports both — choose per-document.