Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


A JavaScript library that adds support for typing (Romanized) Nepali(नेपाली) input on HTML <input> and <textarea>.

Supported Browsers

This library has been tested to work most modern browsers, the oldest ones being Internet Explorer 9, 10 and 11. If you are running an even older browser, you might want to look into the legacy version.

Live Demo / Playground

Official Demo :

More Examples

If you've used Nepalify in a project and would like to include it in this list, feel free to reach out or open an issue.


Nepalify is available in CommonJS2, ES6 as well as UMD formats for all different needs.
It can be consumed directly via Unpkg CDN into your pages, or installed via NPM to include in your application bundle.

Unpkg CDN installation

Via Unpkg, you can directly use the bare url for the latest version.

<script src="" />

Or, include the full fixed url.

<script src="" />

Also, add an input/textarea element with a unique id, if you want to follow along.

<input id="unique-input" />
<textarea id="unique-textarea"></textarea>

Optionally the following attributes can be used on the elements above.

autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"


The library is available on NPM as nepalify.

npm install nepalify

Afterwards, you can use CommonJS imports

const nepalify = require('nepalify');

Or, you can use ES6 imports

import nepalify from "nepalify";


The default exports from the library consists of a handful of functions, as explained below.


This method allows the library code to intercept the keypress events on <input> and <textarea> html elements, given an id selector. This can only be used in a browser.

The argument to this function is the same as you'd provide to the standard getElementById

var inputEl = nepalify.interceptElementById("unique-input");
var textareaEl = nepalify.interceptElementById("unique-textarea");

At this point, the library should already be intercepting the keypresses. Go ahead and give it a try.

The object returned by the function above has more methods that can be used to control the interception.


Returns a boolean value indicating whether the interception is turned on or not.


Enable the interception on the element. Already done by default.


Disable the interception on the element. Useful for clean up or building toggle behaviour.


This method allows you to format the text to Unicode nepali. Also usable in Node or any other non-browser javascript code.

var text = "kiMkr/tv/ybimuX/";


While the library is intended to run in the browser, you'll need to have node (and npm) installed locally for development.

Most of the npm targets are explained in the package.json file itself. The following flow is preferred for contribution.

  • npm install for installing all the dependencies.
  • npm run test for running the test suite.
  • npm run dev to run a local server, serves an html page with the library injected for manual testing.
  • npm run format to format all the changes before making a PR.


Please check the for details.


Please check the contribution graph graph for now.

Legacy version

The legacy version of this package supported ancient browsers such as IE6, used jQuery as a dependency and relied on a bunch of hacks. It's still preserved on the legacy-jquery branch


Copyright © 2020, Suvash Thapaliya

Distributed under the ISC License.