# How would i go about making a random string?

**URL:** <https://forums.unrealengine.com/t/how-would-i-go-about-making-a-random-string/7377>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [July 10, 2014, 1:44pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-random-string/7377 "2014-07-10T13:44:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![scrcro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scrcro/32/1008648_2.png) [@scrcro](https://forums.unrealengine.com/u/scrcro)\
**Post date:** [July 10, 2014, 2:07pm UTC](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-random-string/7377/2 "2014-07-10T14:07:23Z")

</div>

You’d probably be better off doing this in C++, but what it boils down to is:

You have an array of 26 characters (a-z), and you iterate through your word-length and append a character from the array by picking a random number between 0-25.

Here’s a working blueprint:

 ![randString.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/c/5cfa8e761d196be48a80855eabc02be2de8bee15.png)

In case it isn’t obvious, the high index in the ForLoop is your letter count. Just bear in mind your max index will be _wordlength-1_

For a 6 character string:

```auto

LogBlueprintUserMessages: Generating...
LogBlueprintUserMessages: mwldqz

```

```auto

LogBlueprintUserMessages: Generating...
LogBlueprintUserMessages: ffbhpt

```

```auto

LogBlueprintUserMessages: Generating...
LogBlueprintUserMessages: ndicrc

```

---

_[View the full topic](https://forums.unrealengine.com/t/how-would-i-go-about-making-a-random-string/7377)._
