diff --git a/src/TwigExtension.php b/src/TwigExtension.php
index 857d88c..c1bb012 100644
--- a/src/TwigExtension.php
+++ b/src/TwigExtension.php
@@ -4,6 +4,7 @@ namespace Drupal\twig_tweak;
 
 use Drupal\Core\Block\TitleBlockPluginInterface;
 use Drupal\Core\Site\Settings;
+use Drupal\Core\Link;
 use Drupal\Core\Url;
 use Drupal\image\Entity\ImageStyle;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
@@ -37,6 +38,7 @@ class TwigExtension extends \Twig_Extension {
       new \Twig_SimpleFunction('drupal_set_message', [$this, 'drupalSetMessage']),
       new \Twig_SimpleFunction('drupal_title', [$this, 'drupalTitle']),
       new \Twig_SimpleFunction('drupal_url', [$this, 'drupalUrl']),
+      new \Twig_SimpleFunction('drupal_link', [$this, 'drupalLink']),
     ];
   }
 
@@ -352,23 +354,54 @@ class TwigExtension extends \Twig_Extension {
   }
 
   /**
-   * Generates a URL from internal path.
+   * Generates a URL from an internal path.
    *
    * @param string $user_input
    *   User input for a link or path.
    * @param array $options
    *   (optional) An array of options.
+   * @param boolean $check_access
+   *   (optional) if you want the url to be returned if the current user has
+   *   access to it.
    *
    * @return \Drupal\Core\Url
    *   A new Url object based on user input.
    *
    * @see \Drupal\Core\Url::fromUserInput()
    */
-  public function drupalUrl($user_input, array $options = []) {
+  public function drupalUrl($user_input, array $options = [], $check_access = FALSE) {
     if (!in_array($user_input[0], ['/', '#', '?'])) {
       $user_input = '/' . $user_input;
     }
-    return Url::fromUserInput($user_input, $options);
+    $url = Url::fromUserInput($user_input, $options);
+    if (!$check_access || $url->access()) {
+      return $url;
+    }
+  }
+
+ /**
+   * Generates a link from an internal path.
+   *
+   * @param string $text
+   *   The text to be used for the link
+   * @param string $user_input
+   *   User input for a link or path.
+   * @param array $options
+   *   (optional) An array of options.
+   * @param boolean $check_access
+   *   (optional) if you want the url to be returned if the current user has
+   *   access to it.
+   *
+   * @return \Drupal\Core\Link
+   *   A new Link object
+   *
+   * @see \Drupal\Core\Link::fromTextAndUrl()
+   */
+  public function drupalLink($text, $user_input, array $options = [], $check_access = FALSE) {
+    $url = $this->drupalUrl($user_input, $options, $check_access);
+    if ($url) {
+      return Link::fromTextAndUrl($text, $url);
+    }
   }
 
   /**
diff --git a/tests/src/Functional/TwigTweakTest.php b/tests/src/Functional/TwigTweakTest.php
index 3f25b21..19c1b3f 100644
--- a/tests/src/Functional/TwigTweakTest.php
+++ b/tests/src/Functional/TwigTweakTest.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\Tests\twig_tweak\Functional;
 
+use Drupal\Core\Link;
 use Drupal\Core\Url;
 use Drupal\Tests\BrowserTestBase;
 
@@ -147,6 +148,22 @@ class TwigTweakTest extends BrowserTestBase {
     $xpath = sprintf('//div[@class = "tt-url" and text() = "%s"]', $url);
     $this->assertByXpath($xpath);
 
+    // Test Link.
+    $url = Url::fromUserInput('/node/1', ['absolute' => TRUE]);
+    $link = Link::fromTextAndUrl('View', $url)->toString();
+    $xpath = '//div[@class = "tt-link-view"]';
+    $this->assertEquals($link, trim($this->xpath($xpath)[0]->getHtml()));
+
+    // // Test Edit Link.
+    $url = Url::fromUserInput('/node/1/edit', ['absolute' => TRUE]);
+    $link = Link::fromTextAndUrl('Edit', $url)->toString();
+    $xpath = '//div[@class = "tt-link-edit"]';
+    $this->assertEquals($link, trim($this->xpath($xpath)[0]->getHtml()));
+
+    // // Test Edit Link with access.
+    $xpath = '//div[@class = "tt-link-edit-access"]';
+    $this->assertEquals('', trim($this->xpath($xpath)[0]->getHtml()));
+
     // Test token replacement.
     $xpath = '//div[@class = "tt-token-replace" and text() = "Site name: Drupal"]';
     $this->assertByXpath($xpath);
diff --git a/tests/twig_tweak_test/templates/twig-tweak-test.html.twig b/tests/twig_tweak_test/templates/twig-tweak-test.html.twig
index ed606a3..78c9d19 100644
--- a/tests/twig_tweak_test/templates/twig-tweak-test.html.twig
+++ b/tests/twig_tweak_test/templates/twig-tweak-test.html.twig
@@ -36,6 +36,9 @@
   <div class="tt-status-message">{{ drupal_set_message('Hi!', 'warning') }}</div>
   <div class="tt-title">{{ drupal_title() }}</div>
   <div class="tt-url">{{ drupal_url('node/1', {absolute: true}) }}</div>
+  <div class="tt-link-view">{{ drupal_link('View', 'node/1', {absolute: true}) }}</div>
+  <div class="tt-link-edit">{{ drupal_link('Edit', 'node/1/edit', {absolute: true}) }}</div>
+  <div class="tt-link-edit-access">{{ drupal_link('Edit', 'node/1/edit', {absolute: true}, true) }}</div>
   <div class="tt-token-replace">{{ 'Site name: [site:name]' | token_replace }}</div>
   <div class="tt-preg-replace">{{ 'FOO' | preg_replace('/(foo)/i', '$1-bar') }}</div>
   <div class="tt-image-style">{{ 'public://images/ocean.jpg' | image_style('thumbnail') }}</div>
