Get Product Url by Product Sku Magento 2.

You can get product URL by SKU in Magento 2 using ProductRepositoryInterface.

Using Magento\Catalog\Api\ProductRepositoryInterface you need to call get($sku) method of the interface.

If Product SKU not found, throws an error,

call $this->getProductUrlBySku(); from template or other php class.