Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time
March 25, 2023 10:58
September 14, 2021 22:23
November 22, 2021 23:29
September 14, 2021 22:23
September 14, 2021 22:23
September 14, 2021 23:01
November 10, 2022 10:07
September 14, 2021 22:27
January 30, 2022 13:25
March 25, 2023 10:58
March 25, 2023 10:58


npm version CI BrowserStack Status Coverage Status

Linkify is a JavaScript plugin. Use Linkify to find links in plain-text and convert them to HTML <a> tags. It automatically highlights URLs, #hashtags, @mentions and more.

Jump to


  • Detect URLs and email addresses
  • #hashtag, @mention and #-ticket plugins
  • React and jQuery support
  • Multi-language and emoji support
  • Custom link plugins
  • Fast, accurate and small footprint (~20kB minified, ~11kB gzipped)
  • 99% test coverage
  • Compatible with all modern browsers (Internet Explorer 11 and up)


Launch demo

Installation and Usage

View full documentation.

Download the latest release for direct use in the browser, or install via NPM:

npm install linkifyjs linkify-html

Quick Start

When developing in an environment with JavaScript module loader such as Webpack, use an import statement:

import * as linkify from 'linkifyjs';
import linkifyHtml from 'linkify-html';

Or in Node.js with CommonJS modules

const linkify = require('linkifyjs');
const linkifyHtml = require('linkify-html');

Note: When linkify-ing text that does not contain HTML, install and use the linkify-string package instead of linkify-html. Read more about Linkify's interfaces.


const options = { defaultProtocol: 'https' };
linkifyHtml('Any links to here? If not, contact', options);

Returns the following string:

'Any links to <a href=""></a> here? If not, contact <a href=""></a>'

To modify the resulting links with a target attribute, class name and more, use the available options.

linkify.find('Any links to here? If not, contact');

Returns the following array

    type: 'url',
    value: '',
    isLink: true,
    href: '',
    start: 13,
    end: 23
    type: 'email',
    value: '',
    isLink: true,
    href: '',
    start: 46,
    end: 62

Check if as string is a valid URL or email address:

linkify.test(''); // true

Check if a string is a valid email address:

linkify.test('', 'email'); // false
linkify.test('', 'email'); // true

Usage with React, jQuery or the browser DOM

Read the interface documentation to learn how to use linkify when working with a specific JavaScript environment such as React.

Plugins for @mentions, #hashtags and more

By default Linkify will only detect and highlight web URLs and e-mail addresses. Plugins for @mentions, #hashtags and more may be installed separately. Read the plugin documentation.

Browser Support

Linkify natively supports all modern browsers.

Node.js Support

Linkify is tested on Node.js 10 and up. Older Node.js versions are unofficially supported.


Download the latest release

API Documentation

View full documentation at


Check out




Linkify is made with ❤️ by Hypercontext and @nfrasser