View on GitHub


jQuery plugin to mask data entry in the input text in the form of money (currency).

Download this project as a .zip file Download this project as a tar.gz file

Just a simple way to create masks to your currency form fields with jQuery.


  <script src="//" type="text/javascript"></script>
  <script src="jquery.maskMoney.js" type="text/javascript"></script>
  <input type="text" id="currency" />
  $(function() {

Show Time!


$("#demo2").maskMoney({thousands:'', decimal:'.', allowZero:true, suffix: ' €'});

$("#demo3").maskMoney({prefix:'R$ ', allowNegative: true, thousands:'.', decimal:',', affixesStay: false});


<input type="text" id="demo4" data-thousands="." data-decimal="," data-prefix="R$ " />


$("#demo6").maskMoney('mask', 1999.99);


var num = $('#demo8').maskMoney('unmasked')[0]; alert('type: '+ typeof(num) + ', value: ' + num)


The options that you can set are:

IMPORTANT: if you try to bind maskMoney to a read only field, nothing will happen, since we ignore completely read only fields. So, if you have a read only field, try to bind maskMoney to it, it will not work. Even if you change the field removing the readonly property, you will need to re-bind maskMoney to make it work.


We have 3 bonus methods that can be useful to you:

You can also configure maskMoney options using the data-* API instead of passing it as a hash in the .maskMoney method call. To use it, simply set the options using data-<option>, like this:

    <input type="text" data-symbol="R$ " data-thousands="." data-decimal="," />

And when you bind maskMoney to that field, we will read those options.



jQuery-maskMoney is released under the MIT license.