{"id":37039978,"url":"https://github.com/sebastianlay/linkernizer","last_synced_at":"2026-03-01T01:03:33.729Z","repository":{"id":300106570,"uuid":"1005206609","full_name":"sebastianlay/Linkernizer","owner":"sebastianlay","description":"The (possibly best) .NET library for automatically linking URLs and email addresses","archived":false,"fork":false,"pushed_at":"2025-11-18T21:49:38.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-18T23:17:05.631Z","etag":null,"topics":["anchor","autolink","hyperlink"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Linkernizer","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebastianlay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-19T21:13:10.000Z","updated_at":"2025-11-18T21:49:41.000Z","dependencies_parsed_at":"2025-06-19T22:53:19.729Z","dependency_job_id":"25e07542-d4ab-4682-a502-2061df41ae0c","html_url":"https://github.com/sebastianlay/Linkernizer","commit_stats":null,"previous_names":["sebastianlay/linkernizer"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sebastianlay/Linkernizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianlay%2FLinkernizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianlay%2FLinkernizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianlay%2FLinkernizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianlay%2FLinkernizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebastianlay","download_url":"https://codeload.github.com/sebastianlay/Linkernizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianlay%2FLinkernizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anchor","autolink","hyperlink"],"created_at":"2026-01-14T04:44:23.099Z","updated_at":"2026-03-01T01:03:33.710Z","avatar_url":"https://github.com/sebastianlay.png","language":"C#","readme":"# Linkernizer\n\nWelcome to Linkernizer, the (possibly best) .NET library for automatically linking URLs and email addresses.  \nIt takes in plain text and wraps anything it considers a link with the HTML markup for a hyperlink / anchor.\n\nYou can use it like this:\n```c#\nvar linkernizer = new Linkernizer();\nvar input = \"Visit us at www.example.org or email us at mail@example.org!\";\nvar output = linkernizer.Linkernize(input);\n// Visit us at \u003ca href=\"https://www.example.org\"\u003ewww.example.org\u003c/a\u003e or email us at \u003ca href=\"mailto:mail@example.org\"\u003email@example.org\u003c/a\u003e!\n```\n\nYou can configure a few additional options like this:\n```c#\nvar linkernizer = new Linkernizer(options =\u003e {\n  options.OpenExternalLinksInNewTab = true; // inserts target=\"_blank\"\n  options.InternalHost = \"www.example.com\"; // do not insert target=\"_blank\" on these links\n  options.DefaultScheme = \"http://\"; // use this scheme for links starting with www.\n});\n```\n\n## Why should I use or not use Linkernizer?\n\nYou should use it because:\n- It is **fast** (see the [benchmarks](#benchmarks) below for more details)\n- It uses **little memory** (there are zero allocations after the setup when the input does not contain links)\n- It has **only one dependency** (to [Microsoft.SourceLink.GitHub](https://www.nuget.org/packages/microsoft.sourcelink.github/))\n- It **provides an interface** so that it can be used via dependency injection\n\nHowever, there are also some limitations:\n- Links are not validated against a full list of [top-level domains](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains) (as this list will be outdated quickly)\n- Links are not validated against a full list of [URI schemes](https://en.wikipedia.org/wiki/List_of_URI_schemes) (as these could change quickly as well)\n- Telephone numbers are not linked automatically (as this usually generates too many false positives for my taste)\n- It assumes the input does not already contain HTML (and will likely lead to invalid markup if this is not the case)\n\n## Installation\n\nThe library can be used like any other NuGet package. For example:\n```PowerShell\n\u003e dotnet add package Linkernizer\n```\n\nYou can find more information on [https://www.nuget.org/packages/Linkernizer](https://www.nuget.org/packages/Linkernizer).\n\n## Benchmarks\n\nThe benchmarks compare the following libraries in their default configuration:\n- [Linkernizer](https://github.com/sebastianlay/Linkernizer) (1.0.2)\n- [AutoLink](https://github.com/mganss/AutoLink) (2.0.5)\n- [TextHelper](https://github.com/tylermercier/TextHelper) (0.2.0)\n\nThe execution time (excluding initial setup):\n\n![Execution time](https://raw.githubusercontent.com/sebastianlay/Linkernizer/refs/heads/main/images/execution-time.svg)\n\nThe memory allocated (excluding initial setup):\n\n![Memory allocated](https://raw.githubusercontent.com/sebastianlay/Linkernizer/refs/heads/main/images/memory-allocated.svg)\n\nKeep in mind that the exact values will vary from run to run.\n```\n| Method                         | Mean         | Error      | StdDev     | Gen0   | Allocated |\n|------------------------------- |-------------:|-----------:|-----------:|-------:|----------:|\n| LinkernizerShortTextNoMatches  |     10.04 ns |   0.031 ns |   0.028 ns |      - |         - |\n| LinkernizerLongTextNoMatches   |     38.89 ns |   0.104 ns |   0.092 ns |      - |         - |\n| LinkernizerShortTextTwoMatches |    644.91 ns |   4.310 ns |   3.599 ns | 0.1411 |     592 B |\n| LinkernizerLongTextFourMatches |  3,248.53 ns |  15.657 ns |  13.880 ns | 0.5493 |    2312 B |\n|------------------------------- |-------------:|-----------:|-----------:|-------:|----------:|\n| AutoLinkShortTextNoMatches     |  1,112.75 ns |   3.894 ns |   3.643 ns | 0.0210 |      88 B |\n| AutoLinkLongTextNoMatches      |  8,240.50 ns |  63.245 ns |  56.065 ns | 0.0153 |      88 B |\n| AutoLinkShortTextTwoMatches    |  1,752.95 ns |   6.943 ns |   5.798 ns | 0.2937 |    1232 B |\n| AutoLinkLongTextFourMatches    |  9,930.48 ns | 103.320 ns |  96.645 ns | 2.0142 |    8448 B |\n|------------------------------- |-------------:|-----------:|-----------:|-------:|----------:|\n| TextHelperShortTextNoMatches   |  2,860.00 ns |   9.203 ns |   7.185 ns | 0.0381 |     168 B |\n| TextHelperLongTextNoMatches    | 20,015.26 ns |  33.143 ns |  25.876 ns | 0.0305 |     168 B |\n| TextHelperShortTextTwoMatches  |  3,962.34 ns |  35.980 ns |  30.045 ns | 0.2441 |    1040 B |\n| TextHelperLongTextFourMatches  | 22,227.44 ns | 123.171 ns | 115.214 ns | 0.7324 |    3136 B |\n```\nYou can verify the results by running [the same benchmarks](https://github.com/sebastianlay/Linkernizer/blob/main/Linkernizer.Benchmarks/Program.cs) on your machine.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianlay%2Flinkernizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianlay%2Flinkernizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianlay%2Flinkernizer/lists"}