Thousands of tools! Check out Online Tools – I have now added thousands of tools.

I often have to generate random ASCII so I created this simple online utility that does it for me. It lets you generate however many random ASCII characters you need from a predefined pattern or the given code point range. It works in the browser and is powered by alien technology from the future.

Random Ascii Generator Options

ASCII Generation Mode
Choose one of the patterns.
Count and Separator
Format of Special Symbols
Use pretty Unicode glyphs, such as ␀, ␁, ␂, etc. for non-printable control characters.
Use a pretty Unicode glyph ␠ for regular spaces.

Random Ascii Generator Examples (click to try!)

Predefined ASCII Pattern
In this example, we generate random ASCII characters using a predefined pattern. We choose the character set that includes all lowercase letters, all uppercase letters, and all digits. We generate 10 string with 32 random characters in each string and get 320 ASCII symbols in total in the output.
0S3Rbi6dAy9s99aPibE9hmRiSk46lST3
qtmlIP2ESWHAJ0JlIhYcuw1qEvTkSxai
VcFlQHid6W50mJ1QzLTl7QS0mc5hPQsm
KBzJFDeLIe1JdzC5IzwGD3UvhaA9FVoL
1UQagzdDVAfFNQpRuw0d59o6Yb0EDOWP
HJxVBz033h70oH3Dluq8KKeVNF2Eq1fC
fi9kQkQsEX01P8N3mTkev2E46O1EM7Me
X5HTC56zeEGORDZ4VXjs5iSbjLLDipcF
YT0A9uKIqp6BdB7Sztg5xm3UAa8JA0Ou
SIgNSDTIt70JZZWv1DkEVU5w7DgotZ49
Use a Predefined Pattern
How many ASCII strings?
Length of each ASCII string.
Separate ASCII strings with this character.
Separate ASCII symbols with this character.
Prettify Control Chars
Prettify Spaces
Custom ASCII Pattern
In this example, we activate the "Use a Custom Pattern" option and enter all math-related symbols and numbers in the custom characters field. We generate only one ASCII string that contains 100 random characters that are separated by spaces.
+ - 4 < = 7 * 2 0 6 3 3 > = / 0 ( 9 4 ^ = 9 > - 4 3 - = - 8 = 9 0 = 8 4 * > 5 2 < / 1 3 ) ^ 6 9 - * ) ^ ^ 9 4 7 > 8 4 6 2 ^ / / 1 5 7 > ( 2 + + - - 8 9 3 4 3 8 ) ^ 4 3 6 4 7 1 < / 6 7 2 ^ 2 8 3 = ) /
Use a Custom Pattern
Enter a custom pattern here.
How many ASCII strings?
Length of each ASCII string.
Separate ASCII strings with this character.
Separate ASCII symbols with this character.
Prettify Control Chars
Prettify Spaces
Random ASCII Range
In this example, we select the range generation mode to extract random symbols from several ASCII character groups at once. We enter the range 0-31 for control characters, the single-symbol ranges 32 and 127 for the space and delete characters, and the range 65-89 for all uppercase English letters. We generate 6 ASCII strings of 12 random comma-separated symbols, and enable the "Prettify Control Chars" and "Prettify Spaces" options to visualize special non-printable characters and space characters.
A, ␜, M, ␜, ␛, ␇, W, ␞, U, ␚, ␝, H
␒, P, I, ␡, ␂, X, U, N, W, K, ␝, P
Q, ␏, ␓, ␌, U, ␅, ␜, ␏, L, E, ␀, ␑
G, U, B, ␅, E, ␓, S, F, K, ␠, O, ␁
␊, ␅, ␇, ␂, ␚, ␁, ␚, V, ␚, W, L, ␋
␊, ␋, ␎, ␓, ␍, ␒, E, ␆, ␜, A, J, ␓
Use an ASCII Range
Enter the ASCII code range start-end.
How many ASCII strings?
Length of each ASCII string.
Separate ASCII strings with this character.
Separate ASCII symbols with this character.
Prettify Control Chars
Prettify Spaces

How Does This Random Ascii Generator Work?

This random ASCII character generator works entirely in your browser and is written in JavaScript. It supports three ASCII generation modes – generating ASCII from a predefined pattern, generating ASCII from your own pattern, and generating ASCII from a code range. To distinguish between the generating modes, it uses three simple control statements: if (pattern), else if (customPattern), else, each responsible for one of the modes. The first if statement is used to generate a predefined pattern. In this mode, the program calls a function that stores all the predefined patterns in a lookup table called charsets and returns an array with all characters in the charset. For example, all lowercase letters are stored in charsets['alphalc'] array that looks like this: ["a", "b", "c", …, "z"]. To select a random array element, it calls the randomArrEl(charset) function and puts the return value in the char variable. This function is a one-liner arr[Math.floor(Math.random() * arr.length)]. The second else if statement is used to generate a custom pattern. In this mode, the program splits the custom character pattern into symbols using the grapheme-splitter.js library and assigns the created array to the customChars variable. Then it calls the function randomArrEl(customChars) to generate a random ASCII character. The final else statement is used to generate ASCII characters from a range of ASCII codes. The program converts the input range (or ranges, if multiple are specified) to the array decimals and picks a random dec value from it via the same randomArrEl(decimals) function. To convert the picked decimal value to an ASCII symbol, it calls the String.fromCharCode(dec) function. Each of the three control statements contain two for loops. The first loop runs from 1 to count that is responsible for the number of ASCII strings in the output. The second loop runs from 1 to length and is responsible for the length of each result. At the end of both loops, the program calls the output prettifiction function that optionally replaces ASCII control characters and spaces with Unicode glyphs and converts the output array chars to a string using the join() function.

Created by Browserling

This random ascii generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by our web developer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!

Secret message: If you love my tools, then I love you, too! Use coupon code TOOLLING to get a discount at my company.