Skip to content


Subversion checkout URL

You can clone with
Download ZIP
jQuery extensions for commifying a string.
JavaScript CSS
Branch: master
Failed to load latest commit information.
demo updated icon path
icon gradient updates
test Update test.js
.gitignore Ignore DS_Store some example usages
bower.json Define a bower package
jquery.commify.js Update jquery.commify.js
todo Updated version to 1.0; changed version in todo appropriately
version.txt Updated version to 1.0; changed version in todo appropriately

jQuery Commify - Adding commas to your boring numbers.

The jQuery Commify extension provides an easy way to add commas to numbers without them. While not required, there are several customizations you can make, such as adding a prefix ('$' for a monetary value would be the most obvious here, but could just as easily be '%' or '€'), or rounding the number off to a 10th or 100th etc.

If you'd like to improve upon this, by all means create a branch and send a pull request for that branch when you're good and ready.

Example usage

    => 1,100

    => 100,100.00

    => "100,100.00"         // Notice how the dollar sign was dropped here,
                            // Use a prefix option instead

  With options:

    $.commify("$100100.00", { prefix:'$' }); 
      => "$100,100.00"

    $.commify("$100175.00", { round:10 }); 
      => "$100,180.00"

    $.commify("$100175.00", { round:100 }); 
      => "100,200.00"

    $.commify("$100175.00", { 
        prefix: '$',
      => "$100,200.00"
Something went wrong with that request. Please try again.