yes this is possible via ethers.js. Run the following piece of code in nodejs environment:
const ethers = require('ethers');
async function init() {
//creating new random mnemonic
//const mnemonic = await ethers.utils.HDNode.entropyToMnemonic(ethers.utils.randomBytes(16));
const mnemonic = 'YOUR_MNEMONIC_WORDS';
//mnemonic to private, public key and address
const wallet = ethers.Wallet.fromMnemonic(mnemonic);
}
init();
If you need this logic on website you will have to use browserify, because browsers don't have the require method defined.