A Mouse Pointer Random Number Generator


Move the mouse randomly in the gray field to the left to generate random numbers or characters.

Numbers are generated based on the position where the mouse changes horizontal or vertical direction inside the gray area. “Color outside the lines” a little to be sure that the entire field is included.

In custom mode, you may select subsets of characters and/or a special character set.  Including multiple copies of characters such as digits increases their representation in the output.

Click any mode to clear the data and start over.




speed:          (values above 1 add more computer-generated pseudorandomness)

The following apply to the displayed output. Restore it if necessary by clicking “show output” above.

trim to characters

column width  | remove line breaks


display as pixels | scale canvas 


The script takes the coordinates of the mouse pointer in the 256 × 256 pixel field, converts them to two 8-bit binary numbers, concatenates them, then combines them with a 16-bit computer-generated pseudorandom number using the XOR operator.  This results in a high degree of randomness, but is rather slow.  To speed up the process, the bits of the original mouse coordinates are shuffled using the Fisher–Yates algorithm, then combined with a new pseudorandom number.  This process is repeated a random number of times for each mouse position, the number being between 1 and 2000 for the ×1000 speed, and so on.

The raw binary output may be displayed as hexadecimal, decimal, base64, or a custom character set.  A few simple tests of randomness may be performed on binary, hexadecimal, or decimal output; more may be performed with the NIST suite as described below.


please visit russellcottrell.com