I recently needed a way to convert a number to currency format using Javascript. Â I found the best solution in Alex G’s comment on Brad Harris’s post. Â But as usual, there were issues when cutting/pasting from the web so I just wanted to post here as a Gist so it might help someone else and also so that someone can improve it if they want.