Simple jQuery Input Number Formatting Plugin - Input Format

Simple jQuery Input Number Formatting Plugin - Input Format
File Size: 94.8 KB
Views Total: 1625
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

inputformat is a simple-to-use jQuery plugin used to automatically format numbers the users input based on your format settings.

Format settings available:

  • Thousand separator
  • Decimal separator
  • Allow decimals
  • Allow negative
  • Allow leading zero
  • numeric only

Basic Usage:

1. Load the jQuery inputformat plugin after jQuery library.

<script src="//"></script>
<script src="src/jquery-inputformat.js"></script>

2. Create a normal Html input on your web page.

<input id="default" type="text">

3. Call the plugin to apply the default format setting on the input field.


4. Modify the following format settings to fit your needs.

thousandSep: ',',
decimalSep: '.',
allowDecimals: true,
allowNegative: true,
allowLeadingZero: false,
maxDecimalDigits: 'unlimited',
numericOnly: true

Change logs:


  • bug fix for input number cannot input zero


  • fix bug when dealing with numeric from numpad
  • fix conflicts

This awesome jQuery plugin is developed by ali-irawan. For more Advanced Usages, please check the demo page or visit the official website.